cache

package
v1.0.0-rc.1 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: 7 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 tenant/cache.Interface.

func (*Cache) List

func (c *Cache) List() []common.Tenant

List implements Interface.

func (*Cache) Run

func (c *Cache) Run(stop <-chan struct{}) <-chan string

Run implements cache.Interface.

type Config

type Config struct {
	// CacheTickSeconds is a delay before attempts to refresh the cache.
	CacheTickSeconds int
}

Config represents configuration for the tenant cache.

type Interface

type Interface interface {
	// Starts synchronization loop
	// which maintains the store.
	// Returns update channel.
	// Update channel receives notifications
	// when change in a store detected.
	Run(stop <-chan struct{}) <-chan string

	// Returns a list of objects in cache.
	List() []common.Tenant
}

Interface defines tenant cache behavior.

func New

func New(client *common.RestClient, config Config) Interface

New creates new empty tenant cache.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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