otrestful

package module
v0.0.0-...-fa2eadf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

README

go-restful

[WIP] Right now, this is a repo for @mqliang 's GSoC. Hope some days, this will become a formal opentracing lib for go-restful.

Documentation

Index

Constants

View Source
const DefaultComponentName = "emicklei/go-restful"
View Source
const DefaultOperationName = "go-restful client"

Variables

View Source
var (
	DefaultOperationNameFunc = func(r *restful.Request) string {

		return r.SelectedRoutePath()
	}
)

Functions

func NewOTFilter

func NewOTFilter(tracer opentracing.Tracer, options ...FilterOption) restful.FilterFunction

NewOTFilter returns a go-restful filter which add OpenTracing instrument

Types

type FilterOption

type FilterOption func(*filterOptions)

FilterOption controls the behavior of the Filter.

func ComponentName

func ComponentName(componentName string) FilterOption

ComponentName returns a FilterOption that sets the component name name for the server-side span.

func OperationNameFunc

func OperationNameFunc(f func(r *restful.Request) string) FilterOption

OperationNameFunc returns a FilterOption that uses given function f to generate operation name for each server-side span.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL