Skip to content

Commit

Permalink
Fix streams mode HTTP API
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffail committed May 5, 2023
1 parent 0e68e07 commit 8277b60
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file.

## Unreleased

## 4.15.0 - 2023-05-05

### Added

- Flag `--skip-env-var-check` added to the `lint` subcommand, this disables the new linting behaviour where environment variable interpolations without defaults throw linting errors when the variable is not defined.
Expand All @@ -19,6 +21,7 @@ All notable changes to this project will be documented in this file.

- Provide msgpack plugins through `public/components/msgpack`.
- The `kafka_franz` input should no longer commit offsets one behind the next during partition yielding.
- The streams mode HTTP API should no longer route requests to `/streams/<stream-ID>` to the `/streams` handler. This issue was introduced in v4.14.0.

## 4.14.0 - 2023-04-25

Expand Down
26 changes: 13 additions & 13 deletions internal/stream/manager/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ func (m *Type) registerEndpoints(enableCrud bool) {
return
}
m.manager.RegisterEndpoint(
"/streams",
"GET: List all streams along with their status and uptimes."+
" POST: Post an object of stream ids to stream configs, all"+
" streams will be replaced by this new set.",
m.HandleStreamsCRUD,
"/resources/{type}/{id}",
"POST: Create or replace a given resource configuration of a specified type. Types supported are `cache`, `input`, `output`, `processor` and `rate_limit`.",
m.HandleResourceCRUD,
)
m.manager.RegisterEndpoint(
"/streams/{id}/stats",
"GET a structured JSON object containing metrics for the stream.",
m.HandleStreamStats,
)
m.manager.RegisterEndpoint(
"/streams/{id}",
Expand All @@ -51,14 +54,11 @@ func (m *Type) registerEndpoints(enableCrud bool) {
m.HandleStreamCRUD,
)
m.manager.RegisterEndpoint(
"/streams/{id}/stats",
"GET a structured JSON object containing metrics for the stream.",
m.HandleStreamStats,
)
m.manager.RegisterEndpoint(
"/resources/{type}/{id}",
"POST: Create or replace a given resource configuration of a specified type. Types supported are `cache`, `input`, `output`, `processor` and `rate_limit`.",
m.HandleResourceCRUD,
"/streams",
"GET: List all streams along with their status and uptimes."+
" POST: Post an object of stream ids to stream configs, all"+
" streams will be replaced by this new set.",
m.HandleStreamsCRUD,
)
}

Expand Down

0 comments on commit 8277b60

Please sign in to comment.