minion

package
v0.0.0-...-ac8ee45 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2014 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package minion provides Registry interface and implementation for storing Minions.

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

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 REST

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

REST implements the RESTStorage interface, backed by a MinionRegistry.

func NewREST

func NewREST(m Registry) *REST

NewREST returns a new REST.

func (*REST) Create

func (rs *REST) Create(obj runtime.Object) (<-chan runtime.Object, error)

func (*REST) Delete

func (rs *REST) Delete(id string) (<-chan runtime.Object, error)

func (*REST) Get

func (rs *REST) Get(id string) (runtime.Object, error)

func (*REST) List

func (rs *REST) List(selector labels.Selector) (runtime.Object, error)

func (*REST) New

func (*REST) New() runtime.Object

func (*REST) Update

func (rs *REST) Update(minion runtime.Object) (<-chan runtime.Object, error)

type Registry

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

Registry keeps 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

NewRegistry initializes a minion registry with a list of minions.

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