Documentation

Index

Constants

View Source
const (
	CONNECTED = PruneStatus(iota)
	DISCONNECTED
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PruneStatus

type PruneStatus int

type Registry

type Registry interface {
	Register(uri route.Uri, endpoint *route.Endpoint)
	Unregister(uri route.Uri, endpoint *route.Endpoint)
	Lookup(uri route.Uri) *route.EndpointPool
	LookupWithInstance(uri route.Uri, appID, appIndex string) *route.EndpointPool
}

type RouteRegistry

type RouteRegistry struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewRouteRegistry

func NewRouteRegistry(logger logger.Logger, c *config.Config, reporter metrics.RouteRegistryReporter) *RouteRegistry

func (*RouteRegistry) Lookup

func (r *RouteRegistry) Lookup(uri route.Uri) *route.EndpointPool

func (*RouteRegistry) LookupWithInstance

func (r *RouteRegistry) LookupWithInstance(uri route.Uri, appID string, appIndex string) *route.EndpointPool

func (*RouteRegistry) MSSinceLastUpdate

func (r *RouteRegistry) MSSinceLastUpdate() int64

func (*RouteRegistry) MarshalJSON

func (r *RouteRegistry) MarshalJSON() ([]byte, error)

func (*RouteRegistry) NumEndpoints

func (r *RouteRegistry) NumEndpoints() int

func (*RouteRegistry) NumUris

func (registry *RouteRegistry) NumUris() int

func (*RouteRegistry) Register

func (r *RouteRegistry) Register(uri route.Uri, endpoint *route.Endpoint)

func (*RouteRegistry) StartPruningCycle

func (r *RouteRegistry) StartPruningCycle()

func (*RouteRegistry) StopPruningCycle

func (r *RouteRegistry) StopPruningCycle()

func (*RouteRegistry) SuspendPruning

func (r *RouteRegistry) SuspendPruning(f func() bool)

func (*RouteRegistry) TimeOfLastUpdate

func (r *RouteRegistry) TimeOfLastUpdate() time.Time

func (*RouteRegistry) Unregister

func (r *RouteRegistry) Unregister(uri route.Uri, endpoint *route.Endpoint)

Source Files

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.