registry

package
v0.0.0-...-8ab5ff9 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2016 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegistryInterface

type RegistryInterface interface {
	Register(uri route.Uri, endpoint *route.Endpoint)
	Unregister(uri route.Uri, endpoint *route.Endpoint)
	Lookup(uri route.Uri) *route.Pool
	StartPruningCycle()
	StopPruningCycle()
	NumUris() int
	NumEndpoints() int
	MarshalJSON() ([]byte, error)
}

type RouteRegistry

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

func NewRouteRegistry

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

func (*RouteRegistry) Lookup

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

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) TimeOfLastUpdate

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

func (*RouteRegistry) Unregister

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

type Trie

type Trie struct {
	Segment    string
	Pool       *route.Pool
	ChildNodes map[string]*Trie
	Parent     *Trie
}

func NewTrie

func NewTrie() *Trie

func (*Trie) Delete

func (r *Trie) Delete(uri route.Uri) bool

func (*Trie) EachNodeWithPool

func (r *Trie) EachNodeWithPool(f func(*Trie))

func (*Trie) EndpointCount

func (r *Trie) EndpointCount() int

func (*Trie) Find

func (r *Trie) Find(uri route.Uri) (*route.Pool, bool)

func (*Trie) Insert

func (r *Trie) Insert(uri route.Uri, value *route.Pool) *Trie

func (*Trie) MatchUri

func (r *Trie) MatchUri(uri route.Uri) (*route.Pool, bool)

func (*Trie) PoolCount

func (r *Trie) PoolCount() int

func (*Trie) PruneDeadLeaves

func (r *Trie) PruneDeadLeaves()

func (*Trie) Snip

func (r *Trie) Snip()

func (*Trie) ToMap

func (r *Trie) ToMap() map[route.Uri]*route.Pool

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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