service

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetServiceEnvironmentVariables

func GetServiceEnvironmentVariables(registry Registry, machine string) ([]api.EnvVar, error)

GetServiceEnvironmentVariables populates a list of environment variables that are use in the container environment to get access to services.

func NewRegistryStorage

func NewRegistryStorage(registry Registry, cloud cloudprovider.Interface, machines minion.Registry) apiserver.RESTStorage

NewRegistryStorage returns a new RegistryStorage.

Types

type Registry

type Registry interface {
	ListServices() (*api.ServiceList, error)
	CreateService(svc api.Service) error
	GetService(name string) (*api.Service, error)
	DeleteService(name string) error
	UpdateService(svc api.Service) error
	WatchServices(labels, fields labels.Selector, resourceVersion uint64) (watch.Interface, error)

	// TODO: endpoints and their implementation should be separated, setting endpoints should be
	// supported via the API, and the endpoints-controller should use the API to update endpoints.
	endpoint.Registry
}

Registry is an interface for things that know how to store services.

type RegistryStorage

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

RegistryStorage adapts a service registry into apiserver's RESTStorage model.

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) ResourceLocation

func (rs *RegistryStorage) ResourceLocation(id string) (string, error)

ResourceLocation returns a URL to which one can send traffic for the specified service.

func (*RegistryStorage) Update

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

func (*RegistryStorage) Watch

func (rs *RegistryStorage) Watch(label, field labels.Selector, resourceVersion uint64) (watch.Interface, error)

Watch returns Services events via a watch.Interface. It implements apiserver.ResourceWatcher.

Jump to

Keyboard shortcuts

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