Documentation ¶
Overview ¶
Package http contains several client/server http plugin which can be used for integration with net/http.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(tracer *pobpgo.Tracer, options ...ClientOption) (*http.Client, error)
NewClient returns an HTTP Client with tracer
func NewServerMiddleware ¶
func NewServerMiddleware(tracer *pobpgo.Tracer, options ...ServerOption) (func(http.Handler) http.Handler, error)
NewServerMiddleware returns a http.Handler middleware with tracing.
Types ¶
type ClientConfig ¶
type ClientConfig struct {
// contains filtered or unexported fields
}
type ClientOption ¶
type ClientOption func(*ClientConfig)
ClientOption allows optional configuration of Client.
func WithClient ¶
func WithClient(client *http.Client) ClientOption
WithClient set customer http client.
func WithClientOperationName ¶
func WithClientOperationName(name string) ClientOption
WithOperationName override default operation name.
func WithClientTag ¶
func WithClientTag(key string, value string) ClientOption
WithClientTag adds extra tag to client spans.
type ServerOption ¶
type ServerOption func(*handler)
ServerOption allows Middleware to be optionally configured.
func WithServerOperationName ¶
func WithServerOperationName(name string) ServerOption
WithOperationName override default operation name.
func WithServerTag ¶
func WithServerTag(key string, value string) ServerOption
Tag adds extra tag to server spans.
Click to show internal directories.
Click to hide internal directories.