Documentation ¶
Index ¶
- type EndpointRegistry
- func (r *EndpointRegistry) MiddlewareOpts(route *mux.Route) middleware.OverrideOptions
- func (r *EndpointRegistry) PathEntry(path, method string) (*mux.Route, bool)
- func (r *EndpointRegistry) Register(opts RegisterOptions) 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) *EndpointRegistry
NewEndpointRegistry returns a new endpoint registry.
func (*EndpointRegistry) MiddlewareOpts ¶ added in v1.2.0
func (r *EndpointRegistry) MiddlewareOpts(route *mux.Route) middleware.OverrideOptions
MiddlewareOpts returns the OverrideOptions for the route, or nil if none exist.
func (*EndpointRegistry) PathEntry ¶ added in v1.2.0
func (r *EndpointRegistry) PathEntry(path, method string) (*mux.Route, bool)
PathEntry resolves a registered route that was registered by path and method, not by path prefix.
func (*EndpointRegistry) Register ¶
func (r *EndpointRegistry) Register(opts RegisterOptions) error
Register registers an endpoint.
func (*EndpointRegistry) RegisterPaths ¶
func (r *EndpointRegistry) RegisterPaths( paths []string, opts RegisterPathsOptions) error
RegisterPaths registers multiple paths for the same handler.
type RegisterOptions ¶
type RegisterOptions struct { Path string PathPrefix string Handler http.Handler Methods []string MiddlewareOverride middleware.OverrideOptions }
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.