bldr_http

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

Resolve resolves the values, emitting them to the handler.

type LookupHTTPHandlerValue

type LookupHTTPHandlerValue = http.Handler

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,

func ExLookupHTTPHandlers

func ExLookupHTTPHandlers(
	ctx context.Context,
	b bus.Bus,
	handlerURL,
	clientID string,
) ([]LookupHTTPHandlerValue, directive.Reference, error)

ExLookupHTTPHandlers executes the LookupHTTPHandler directive.

Jump to

Keyboard shortcuts

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