Skip to content

Commit

Permalink
feat(otelbench): add ping path
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Jan 20, 2024
1 parent 3c2dbd6 commit 60fb6da
Show file tree
Hide file tree
Showing 10 changed files with 364 additions and 23 deletions.
9 changes: 9 additions & 0 deletions _oas/otelbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ servers:
security:
- tokenAuth: []
paths:
/ping:
get:
security: []
operationId: "ping"
responses:
204:
description: Ok
default:
$ref: "#/components/responses/ErrorResponse"
/status:
get:
operationId: "getStatus"
Expand Down
5 changes: 5 additions & 0 deletions internal/otelbench/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ var (

type tokCtx struct{}

func (h Handler) Ping(ctx context.Context) error {
zctx.From(ctx).Debug("Ping")
return nil
}

func (h Handler) GetStatus(ctx context.Context) (*otelbotapi.GetStatusOK, error) {
tok, ok := ctx.Value(tokCtx{}).(string)
if !ok || tok == "" {
Expand Down
74 changes: 74 additions & 0 deletions internal/otelbotapi/oas_client_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

96 changes: 96 additions & 0 deletions internal/otelbotapi/oas_handlers_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 60 additions & 0 deletions internal/otelbotapi/oas_response_decoders_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions internal/otelbotapi/oas_response_encoders_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 60fb6da

Please sign in to comment.