Documentation
¶
Index ¶
- type LookupHTTPHandler
- type LookupHTTPHandlerResolver
- type LookupHTTPHandlerValue
- func ExLookupFirstHTTPHandler(ctx context.Context, b bus.Bus, handlerURL, clientID string, returnIfIdle bool) (LookupHTTPHandlerValue, directive.Reference, error)
- func ExLookupHTTPHandlers(ctx context.Context, b bus.Bus, handlerURL, clientID string) ([]LookupHTTPHandlerValue, directive.Reference, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LookupHTTPHandler ¶
type LookupHTTPHandler interface {
// Directive indicates LookupHTTPHandler is a directive.
directive.Directive
// LookupHTTPHandlerURL is the URL string for the request.
// Cannot be empty.
LookupHTTPHandlerURL() string
// LookupHTTPHandlerClientID is a string identifying the client.
// Can be empty.
LookupHTTPHandlerClientID() string
}
LookupHTTPHandler is a directive to lookup a HTTP handler.
func NewLookupHTTPHandler ¶
func NewLookupHTTPHandler(handlerURL, clientID string) LookupHTTPHandler
NewLookupHTTPHandler constructs a new LookupHTTPHandler directive.
type LookupHTTPHandlerResolver ¶
type LookupHTTPHandlerResolver struct {
// contains filtered or unexported fields
}
LookupHTTPHandlerResolver resolves LookupHTTPHandler with a handler slice.
func NewLookupHTTPHandlerResolver ¶
func NewLookupHTTPHandlerResolver(handlers []http.Handler) *LookupHTTPHandlerResolver
NewLookupHTTPHandlerResolver constructs a new resolver.
func (*LookupHTTPHandlerResolver) Resolve ¶
func (r *LookupHTTPHandlerResolver) Resolve(ctx context.Context, handler directive.ResolverHandler) error
Resolve resolves the values, emitting them to the handler.
type LookupHTTPHandlerValue ¶
LookupHTTPHandlerValue is the result type for LookupHTTPHandler. Multiple results may be pushed to the directive.
func ExLookupFirstHTTPHandler ¶
func ExLookupFirstHTTPHandler( ctx context.Context, b bus.Bus, handlerURL, clientID string, returnIfIdle bool, ) (LookupHTTPHandlerValue, directive.Reference, error)
ExLookupFirstHTTPHandler waits for the first HTTP handler to be returned. if returnIfIdle is set and the directive becomes idle, returns nil, nil, nil,
Click to show internal directories.
Click to hide internal directories.