Documentation ¶
Overview ¶
Package resolver resolves a http request to an endpoint
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrInvalidPath = errors.New("invalid path") )
Functions ¶
Types ¶
type Endpoint ¶
type Endpoint struct { // e.g greeter Name string // HTTP Host e.g example.com Host string // HTTP Methods e.g GET, POST Method string // HTTP Path e.g /greeter. Path string // Domain endpoint exists within Domain string }
Endpoint is the endpoint for a http request
type Option ¶
type Option func(o *Options)
func WithNamespace ¶
WithNamespace sets the function which determines the namespace for a request
func WithServicePrefix ¶ added in v2.9.4
WithServicePrefix sets the ServicePrefix option
type Options ¶
func NewOptions ¶
NewOptions returns new initialised options
type ResolveOption ¶ added in v2.9.4
type ResolveOption func(*ResolveOptions)
ResolveOption sets an option
func Domain ¶ added in v2.9.4
func Domain(n string) ResolveOption
Domain sets the resolve Domain option
type ResolveOptions ¶ added in v2.9.4
type ResolveOptions struct {
Domain string
}
ResolveOptions are used when resolving a request
func NewResolveOptions ¶ added in v2.9.4
func NewResolveOptions(opts ...ResolveOption) ResolveOptions
NewResolveOptions returns new initialised resolve options
Directories ¶
Path | Synopsis |
---|---|
Package grpc resolves a grpc service like /greeter.Say/Hello to greeter service
|
Package grpc resolves a grpc service like /greeter.Say/Hello to greeter service |
Package host resolves using http host
|
Package host resolves using http host |
Package path resolves using http path
|
Package path resolves using http path |
Package vpath resolves using http path and recognised versioned urls
|
Package vpath resolves using http path and recognised versioned urls |
Click to show internal directories.
Click to hide internal directories.