cache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache implements the ServiceDiscovery interface using a local cache. The cache is refreshed periodically using the provided ServiceDiscovery object.

func New

func New(discovery api.ServiceDiscovery, pollInterval time.Duration) (*Cache, error)

New constructs a new Cache. The cache is refreshed at the frequency specified by pollInterval using the provided ServiceDiscovery object.

func (*Cache) ListInstances

func (c *Cache) ListInstances() ([]*api.ServiceInstance, error)

ListInstances queries for the list of service instances currently registered.

func (*Cache) ListServiceInstances

func (c *Cache) ListServiceInstances(serviceName string) ([]*api.ServiceInstance, error)

ListServiceInstances queries for the list of service instances currently registered for the given service.

func (*Cache) ListServices

func (c *Cache) ListServices() ([]string, error)

ListServices queries for the list of services for which instances are currently registered.

Jump to

Keyboard shortcuts

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