Skip to content

Commit

Permalink
Cleanup post merge
Browse files Browse the repository at this point in the history
  • Loading branch information
glinton committed Dec 18, 2019
1 parent 00115f5 commit b6ebfc9
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 1,620 deletions.
22 changes: 0 additions & 22 deletions http/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9651,28 +9651,6 @@ components:
labels:
readOnly: true
$ref: "#/components/schemas/Labels"
TelegrafPlugin:
type: object
properties:
type:
type: string
name:
type: string
description:
type: string
config:
type: string
TelegrafPlugins:
type: object
properties:
version:
type: string
os:
type: string
plugins:
type: array
items:
$ref: "#/components/schemas/TelegrafPlugin"
Telegrafs:
type: object
properties:
Expand Down
24 changes: 0 additions & 24 deletions http/telegraf.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,30 +214,6 @@ func decodeGetTelegrafRequest(ctx context.Context) (i platform.ID, err error) {
return i, nil
}

func decodeGetTelegrafPluginRequest(ctx context.Context, r *http.Request) (*plugins.TelegrafPlugins, error) {
t := r.URL.Query().Get("type")
if len(t) == 0 {
return plugins.AvailablePlugins()
}

return plugins.ListAvailablePlugins(t)
}

func (h *TelegrafHandler) handleGetTelegrafPlugins(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()

telPlugins, err := decodeGetTelegrafPluginRequest(ctx, r)
if err != nil {
h.HandleHTTPError(ctx, err, w)
return
}

if err := encodeResponse(ctx, w, http.StatusOK, telPlugins); err != nil {
logEncodingError(h.log, r, err)
return
}
}

func (h *TelegrafHandler) handleGetTelegrafs(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
filter, err := decodeTelegrafConfigFilter(ctx, r)
Expand Down
Loading

0 comments on commit b6ebfc9

Please sign in to comment.