multicluster-controller: admiralty.io/multicluster-controller/pkg/manager Index | Files

package manager

import "admiralty.io/multicluster-controller/pkg/manager"

Index

Package Files

manager.go

type Cache Uses

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 Uses

type CacheSet map[Cache]struct{}

CacheSet is a set of Caches.

type Controller Uses

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 Uses

type ControllerSet map[Controller]struct{}

ControllerSet is a set of Controllers.

type Manager Uses

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 Uses

func New() *Manager

New creates a Manager.

func (*Manager) AddController Uses

func (m *Manager) AddController(c Controller)

AddController adds a controller to the Manager.

func (*Manager) Start Uses

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.

Package manager imports 2 packages (graph) and is imported by 3 packages. Updated 2018-10-19. Refresh now. Tools for package owners.