Documentation ¶
Index ¶
- Constants
- func NewBalancer(r Registry)
- type Backend
- type Balancer
- type Context
- type Dao
- type Edge
- type Generic
- type Item
- type Node
- type Option
- type Options
- type RawRegistry
- type RegisterOption
- type RegisterOptions
- type Registry
- type Result
- type Server
- type Service
- type Status
- type StatusReporter
- type StatusWatcher
- type URLMux
- type URLOpener
- type Watcher
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 Option ¶
type Option func(*Options)
func WithAction ¶ added in v4.0.1
func WithAction(a pb.ActionType) Option
func WithFailFast ¶ added in v4.0.1
func WithFailFast() Option
func WithFilter ¶
type Options ¶
type RawRegistry ¶ added in v4.0.1
type RegisterOption ¶ added in v4.0.1
type RegisterOption func(options *RegisterOptions)
func WithDeregisterFull ¶ added in v4.0.1
func WithDeregisterFull() RegisterOption
func WithEdgeTo ¶ added in v4.0.1
func WithEdgeTo(id, label string, meta map[string]string) RegisterOption
func WithRegisterFailFast ¶ added in v4.0.1
func WithRegisterFailFast() RegisterOption
func WithWatch ¶ added in v4.0.1
func WithWatch(wi StatusReporter) RegisterOption
type RegisterOptions ¶ added in v4.0.1
type Registry ¶
type Registry interface { RawRegistry RegisterEdge(item1, item2, edgeLabel string, metadata map[string]string, oo ...RegisterOption) (Edge, error) ListAdjacentItems(sourceItem Item, targetOptions ...Option) (items []Item) }
func GraphRegistry ¶ added in v4.0.1
func GraphRegistry(r RawRegistry) Registry
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 Result ¶
type Result interface { Action() pb.ActionType Items() []Item }
type Server ¶ added in v4.0.1
type Server interface { Item Server() }
Server represents a running server
type Service ¶
type Service interface { Item Version() string Tags() []string Start(oo ...RegisterOption) error Stop(oo ...RegisterOption) error ServerScheme() string }
Service represents an instantiated service in the registry
type StatusReporter ¶ added in v4.0.1
type StatusReporter interface {
WatchStatus() (StatusWatcher, error)
}
type StatusWatcher ¶ added in v4.0.1
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.