{"modulePath":"github.com/vcabbage/kit","version":"v0.5.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package instance\n\n## Types\n\n```go\ntype Cache struct {\n\t// contains filtered or unexported fields\n}\n```\nCache keeps track of resource instances provided to it via Update method and implements the Instancer interface\n\n```go\nfunc NewCache() *Cache\n```\nNewCache creates a new Cache.\n\n```go\nfunc (c *Cache) Deregister(ch chan\u003c- sd.Event)\n```\nDeregister implements Instancer.\n\n```go\nfunc (c *Cache) Register(ch chan\u003c- sd.Event)\n```\nRegister implements Instancer.\n\n```go\nfunc (c *Cache) State() sd.Event\n```\nState returns the current state of discovery (instances or error) as sd.Event\n\n```go\nfunc (c *Cache) Update(event sd.Event)\n```\nUpdate receives new instances from service discovery, stores them internally, and notifies all registered listeners.\n\n","path":"github.com/vcabbage/kit/sd/internal/instance","name":"instance","synopsis":"","isRedistributable":true}
