v0.6.0 Latest Latest

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 2 Imported by: 6




This section is empty.


This section is empty.


This section is empty.


type Cache

type Cache interface {
	Start(stop <-chan struct{}) error
	WaitForCacheSync(stop <-chan struct{}) bool

Cache is the interface used by Manager to start and wait for caches to sync.

type CacheSet

type CacheSet map[Cache]struct{}

CacheSet is a set of Caches.

type Controller

type Controller interface {
	Start(stop <-chan struct{}) error
	GetCaches() CacheSet

Controller is the interface used by Manager to start the controllers and get their caches (beforehand).

type ControllerSet

type ControllerSet map[Controller]struct{}

ControllerSet is a set of Controllers.

type Manager

type Manager struct {
	// contains filtered or unexported fields

Manager manages controllers. It starts their caches, waits for those to sync, then starts the controllers.

func New

func New() *Manager

New creates a Manager.

func (*Manager) AddController

func (m *Manager) AddController(c Controller)

AddController adds a controller to the Manager.

func (*Manager) Start

func (m *Manager) Start(stop <-chan struct{}) error

Start gets all the unique caches of the controllers it manages, starts them, then starts the controllers as soon as their respective caches are synced. Start blocks until an error or stop is received.

Jump to

Keyboard shortcuts

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