Documentation
¶
Index ¶
Constants ¶
const (
ServiceMetaOverride = "service-override"
)
Variables ¶
This section is empty.
Functions ¶
func NewBalancer ¶
func NewBalancer(r Registry)
Types ¶
type Backend ¶
type Backend struct { Alive bool ReverseProxy *httputil.ReverseProxy // contains filtered or unexported fields }
type NodeRegistry ¶
type Option ¶
func WithFilter ¶
type Registry ¶
type Registry interface { Start(Item) error Stop(Item) error Register(Item) error Deregister(Item) error Get(string, ...Option) (Item, error) List(...Option) ([]Item, error) Watch(...Option) (Watcher, error) As(interface{}) bool }
func NewRegistry ¶
func OpenRegistry ¶
OpenRegistry opens the Registry identified by the URL given. See the URLOpener documentation in driver subpackages for details on supported URL formats, and https://gocloud.dev/concepts/urls for more information.
type URLMux ¶
type URLMux struct {
// contains filtered or unexported fields
}
URLMux is a URL opener multiplexer. It matches the scheme of the URLs against a set of registered schemes and calls the opener that matches the URL's scheme. See https://gocloud.dev/concepts/urls/ for more information.
The zero value is a multiplexer with no registered schemes.
func DefaultURLMux ¶
func DefaultURLMux() *URLMux
DefaultURLMux returns the URLMux used by OpenTopic and OpenSubscription.
Driver packages can use this to register their TopicURLOpener and/or SubscriptionURLOpener on the mux.
func (*URLMux) OpenRegistry ¶
OpenTopic calls OpenTopicURL with the URL parsed from urlstr. OpenTopic is safe to call from multiple goroutines.
func (*URLMux) Register ¶
Register registers the opener with the given scheme. If an opener already exists for the scheme, Register panics.
func (*URLMux) ValidScheme ¶
ValidScheme returns true if scheme has been registered.