minion

package
v0.0.0-...-e20f597 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2014 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDoesNotExist = fmt.Errorf("The requested resource does not exist.")

Functions

func NewRegistryStorage

func NewRegistryStorage(m Registry) apiserver.RESTStorage

NewRegistryStorage returns a new RegistryStorage.

Types

type CachingRegistry

type CachingRegistry struct {
	// contains filtered or unexported fields
}

func (*CachingRegistry) Contains

func (r *CachingRegistry) Contains(minion string) (bool, error)

func (*CachingRegistry) Delete

func (r *CachingRegistry) Delete(minion string) error

func (*CachingRegistry) Insert

func (r *CachingRegistry) Insert(minion string) error

func (*CachingRegistry) List

func (r *CachingRegistry) List() ([]string, error)

type Clock

type Clock interface {
	Now() time.Time
}

type CloudRegistry

type CloudRegistry struct {
	// contains filtered or unexported fields
}

func NewCloudRegistry

func NewCloudRegistry(cloud cloudprovider.Interface, matchRE string) (*CloudRegistry, error)

func (*CloudRegistry) Contains

func (r *CloudRegistry) Contains(minion string) (bool, error)

func (CloudRegistry) Delete

func (r CloudRegistry) Delete(minion string) error

func (CloudRegistry) Insert

func (r CloudRegistry) Insert(minion string) error

func (*CloudRegistry) List

func (r *CloudRegistry) List() ([]string, error)

type HealthyRegistry

type HealthyRegistry struct {
	// contains filtered or unexported fields
}

func (*HealthyRegistry) Contains

func (r *HealthyRegistry) Contains(minion string) (bool, error)

func (*HealthyRegistry) Delete

func (r *HealthyRegistry) Delete(minion string) error

func (*HealthyRegistry) Insert

func (r *HealthyRegistry) Insert(minion string) error

func (*HealthyRegistry) List

func (r *HealthyRegistry) List() (currentMinions []string, err error)

type Registry

type Registry interface {
	List() (currentMinions []string, err error)
	Insert(minion string) error
	Delete(minion string) error
	Contains(minion string) (bool, error)
}

Keep track of a set of minions. Safe for concurrent reading/writing.

func NewCachingRegistry

func NewCachingRegistry(delegate Registry, ttl time.Duration) (Registry, error)

func NewHealthyRegistry

func NewHealthyRegistry(delegate Registry, client *http.Client) Registry

func NewRegistry

func NewRegistry(minions []string) Registry

Initialize a minion registry with a list of minions.

type RegistryStorage

type RegistryStorage struct {
	// contains filtered or unexported fields
}

RegistryStorage implements the RESTStorage interface, backed by a MinionRegistry.

func (*RegistryStorage) Create

func (rs *RegistryStorage) Create(obj interface{}) (<-chan interface{}, error)

func (*RegistryStorage) Delete

func (rs *RegistryStorage) Delete(id string) (<-chan interface{}, error)

func (*RegistryStorage) Get

func (rs *RegistryStorage) Get(id string) (interface{}, error)

func (*RegistryStorage) List

func (rs *RegistryStorage) List(selector labels.Selector) (interface{}, error)

func (RegistryStorage) New

func (rs RegistryStorage) New() interface{}

func (*RegistryStorage) Update

func (rs *RegistryStorage) Update(minion interface{}) (<-chan interface{}, error)

type SystemClock

type SystemClock struct{}

func (SystemClock) Now

func (SystemClock) Now() time.Time

Jump to

Keyboard shortcuts

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