{"modulePath":"github.com/zencoder/kit","version":"v0.4.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cache\n\n## Types\n\n```go\ntype Cache struct {\n\t// contains filtered or unexported fields\n}\n```\nCache collects the most recent set of endpoints from a service discovery system via a subscriber, and makes them available to consumers. Cache is meant to be embedded inside of a concrete subscriber, and can serve Service invocations directly.\n\n```go\nfunc New(factory sd.Factory, logger log.Logger) *Cache\n```\nNew returns a new, empty endpoint cache.\n\n```go\nfunc (c *Cache) Endpoints() []endpoint.Endpoint\n```\nEndpoints yields the current set of (presumably identical) endpoints, ordered lexicographically by the corresponding instance string.\n\n```go\nfunc (c *Cache) Update(instances []string)\n```\nUpdate should be invoked by clients with a complete set of current instance strings whenever that set changes. The cache manufactures new endpoints via the factory, closes old endpoints when they disappear, and persists existing endpoints if they survive through an update.\n\n","path":"github.com/zencoder/kit/sd/cache","name":"cache","synopsis":"","isRedistributable":true}
