Codebase list golang-github-go-kit-kit / 185f2f8
update comments Alexander Babai 3 years ago
1 changed file(s) with 4 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
2020 // creation by our Endpoint middleware.
2121 Tags opentracing.Tags
2222
23 // GetTags is an optional function that can extract trace tags
23 // GetTags is an optional function that can extract tags
2424 // from the context and add them to the span.
2525 GetTags func(ctx context.Context) opentracing.Tags
2626 }
2727
28 // EndpointOption allows for functional options to Opentracing endpoint
29 // tracing middleware.
28 // EndpointOption allows for functional options to endpoint tracing middleware.
3029 type EndpointOption func(*EndpointOptions)
3130
32 // WithOptions sets all configuration options at once by use of the
33 // EndpointOptions struct.
31 // WithOptions sets all configuration options at once by use of the EndpointOptions struct.
3432 func WithOptions(options EndpointOptions) EndpointOption {
3533 return func(o *EndpointOptions) {
3634 *o = options
6058 }
6159 }
6260
63 // WithExtraTags extracts additional attributes from the context.
61 // WithExtraTags extracts additional tags from the context.
6462 func WithExtraTags(getTags func(ctx context.Context) opentracing.Tags) EndpointOption {
6563 return func(o *EndpointOptions) {
6664 o.GetTags = getTags