Documentation ¶
Index ¶
- type EndpointRegistry
- func (r *EndpointRegistry) PathPrefixRoute(pathPrefix string) (*mux.Route, bool)
- func (r *EndpointRegistry) PathRoute(path, method string) (*mux.Route, bool)
- func (r *EndpointRegistry) Register(opts RegisterOptions, middlewareOpts ...logging.MiddlewareOption) error
- func (r *EndpointRegistry) RegisterPaths(paths []string, opts RegisterPathsOptions, ...) error
- func (r *EndpointRegistry) Walk(walkFn mux.WalkFunc) error
- type RegisterOptions
- type RegisterPathsOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointRegistry ¶
type EndpointRegistry struct {
// contains filtered or unexported fields
}
EndpointRegistry is an endpoint registry that can register routes and instrument them.
func NewEndpointRegistry ¶
func NewEndpointRegistry( router *mux.Router, instrumentOpts instrument.Options, ) *EndpointRegistry
NewEndpointRegistry returns a new endpoint registry.
func (*EndpointRegistry) PathPrefixRoute ¶
func (r *EndpointRegistry) PathPrefixRoute(pathPrefix string) (*mux.Route, bool)
PathPrefixRoute resolves a registered route that was registered by path prefix, not by path and method.
func (*EndpointRegistry) PathRoute ¶
func (r *EndpointRegistry) PathRoute(path, method string) (*mux.Route, bool)
PathRoute resolves a registered route that was registered by path and method, not by path prefix.
func (*EndpointRegistry) Register ¶
func (r *EndpointRegistry) Register( opts RegisterOptions, middlewareOpts ...logging.MiddlewareOption, ) error
Register registers an endpoint.
func (*EndpointRegistry) RegisterPaths ¶
func (r *EndpointRegistry) RegisterPaths( paths []string, opts RegisterPathsOptions, middlewareOpts ...logging.MiddlewareOption, ) error
RegisterPaths registers multiple paths for the same handler.
type RegisterOptions ¶
RegisterOptions are options for registering a handler.
type RegisterPathsOptions ¶
RegisterPathsOptions is options for registering multiple paths with the same handler.
Click to show internal directories.
Click to hide internal directories.