Documentation ¶
Index ¶
- Constants
- type PostSpans
- type PostSpansAccepted
- type PostSpansHandler
- type PostSpansHandlerFunc
- type PostSpansParams
- type ZipkinAPI
- func (o *ZipkinAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *ZipkinAPI) Authorizer() runtime.Authorizer
- func (o *ZipkinAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *ZipkinAPI) Context() *middleware.Context
- func (o *ZipkinAPI) DefaultConsumes() string
- func (o *ZipkinAPI) DefaultProduces() string
- func (o *ZipkinAPI) Formats() strfmt.Registry
- func (o *ZipkinAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *ZipkinAPI) Init()
- func (o *ZipkinAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *ZipkinAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *ZipkinAPI) Serve(builder middleware.Builder) http.Handler
- func (o *ZipkinAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *ZipkinAPI) SetDefaultConsumes(mediaType string)
- func (o *ZipkinAPI) SetDefaultProduces(mediaType string)
- func (o *ZipkinAPI) SetSpec(spec *loads.Document)
- func (o *ZipkinAPI) Validate() error
Constants ¶
const PostSpansAcceptedCode int = 202
PostSpansAcceptedCode is the HTTP code returned for type PostSpansAccepted
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostSpans ¶
type PostSpans struct { Context *middleware.Context Handler PostSpansHandler }
PostSpans swagger:route POST /spans postSpans
Uploads a list of spans encoded per content-type, for example json.
func NewPostSpans ¶
func NewPostSpans(ctx *middleware.Context, handler PostSpansHandler) *PostSpans
NewPostSpans creates a new http.Handler for the post spans operation
type PostSpansAccepted ¶
type PostSpansAccepted struct { }
PostSpansAccepted Accepted
swagger:response postSpansAccepted
func NewPostSpansAccepted ¶
func NewPostSpansAccepted() *PostSpansAccepted
NewPostSpansAccepted creates PostSpansAccepted with default headers values
func (*PostSpansAccepted) WriteResponse ¶
func (o *PostSpansAccepted) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type PostSpansHandler ¶
type PostSpansHandler interface {
Handle(PostSpansParams) middleware.Responder
}
PostSpansHandler interface for that can handle valid post spans params
type PostSpansHandlerFunc ¶
type PostSpansHandlerFunc func(PostSpansParams) middleware.Responder
PostSpansHandlerFunc turns a function with the right signature into a post spans handler
func (PostSpansHandlerFunc) Handle ¶
func (fn PostSpansHandlerFunc) Handle(params PostSpansParams) middleware.Responder
Handle executing the request and returning a response
type PostSpansParams ¶
type PostSpansParams struct { // HTTP Request Object HTTPRequest *http.Request /*A list of spans that belong to any trace. Required: true In: body */ Spans models.ListOfSpans }
PostSpansParams contains all the bound params for the post spans operation typically these are obtained from a http.Request
swagger:parameters PostSpans
func NewPostSpansParams ¶
func NewPostSpansParams() PostSpansParams
NewPostSpansParams creates a new PostSpansParams object with the default values initialized.
func (*PostSpansParams) BindRequest ¶
func (o *PostSpansParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error
BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls
type ZipkinAPI ¶
type ZipkinAPI struct { Middleware func(middleware.Builder) http.Handler // BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function. // It has a default implemention in the security package, however you can replace it for your particular usage. BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator // APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function. // It has a default implemention in the security package, however you can replace it for your particular usage. APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator // BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function. // It has a default implemention in the security package, however you can replace it for your particular usage. BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator // JSONConsumer registers a consumer for a "application/json" mime type JSONConsumer runtime.Consumer // JSONProducer registers a producer for a "application/json" mime type JSONProducer runtime.Producer // PostSpansHandler sets the operation handler for the post spans operation PostSpansHandler PostSpansHandler // ServeError is called when an error is received, there is a default handler // but you can set your own with this ServeError func(http.ResponseWriter, *http.Request, error) // ServerShutdown is called when the HTTP(S) server is shut down and done // handling all active connections and does not accept connections any more ServerShutdown func() // Custom command line argument groups with their descriptions CommandLineOptionsGroups []swag.CommandLineOptionsGroup // User defined logger function. Logger func(string, ...interface{}) // contains filtered or unexported fields }
ZipkinAPI Zipkin's v2 api currently includes a POST endpoint that can receive spans.
func NewZipkinAPI ¶
NewZipkinAPI creates a new Zipkin instance
func (*ZipkinAPI) AuthenticatorsFor ¶
func (o *ZipkinAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*ZipkinAPI) Authorizer ¶
func (o *ZipkinAPI) Authorizer() runtime.Authorizer
Authorizer returns the registered authorizer
func (*ZipkinAPI) ConsumersFor ¶
ConsumersFor gets the consumers for the specified media types
func (*ZipkinAPI) Context ¶
func (o *ZipkinAPI) Context() *middleware.Context
Context returns the middleware context for the zipkin API
func (*ZipkinAPI) DefaultConsumes ¶
DefaultConsumes returns the default consumes media type
func (*ZipkinAPI) DefaultProduces ¶
DefaultProduces returns the default produces media type
func (*ZipkinAPI) HandlerFor ¶
HandlerFor gets a http.Handler for the provided operation method and path
func (*ZipkinAPI) Init ¶
func (o *ZipkinAPI) Init()
Init allows you to just initialize the handler cache, you can then recompose the middelware as you see fit
func (*ZipkinAPI) ProducersFor ¶
ProducersFor gets the producers for the specified media types
func (*ZipkinAPI) RegisterFormat ¶
RegisterFormat registers a custom format validator
func (*ZipkinAPI) Serve ¶
func (o *ZipkinAPI) Serve(builder middleware.Builder) http.Handler
Serve creates a http handler to serve the API over HTTP can be used directly in http.ListenAndServe(":8000", api.Serve(nil))
func (*ZipkinAPI) ServeErrorFor ¶
func (o *ZipkinAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
ServeErrorFor gets a error handler for a given operation id
func (*ZipkinAPI) SetDefaultConsumes ¶
SetDefaultConsumes returns the default consumes media type
func (*ZipkinAPI) SetDefaultProduces ¶
SetDefaultProduces sets the default produces media type