registry

package
v0.0.0-...-b4c5e9e Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Register

type Register interface {
	CreateService(service *api.Service) (*api.Service, error)
	GetService(key string) (*api.Service, error)
	GetServices() ([]api.Service, error)
	CreateEndpoints(endpoints *api.Endpoints) (*api.Endpoints, error)
	GetServiceEndpoints(name string) (*api.Endpoints, error)
	GetEndpoints() ([]api.Endpoints, error)
	WatchServices(services chan []api.Service)
	WatchEndpoints(endpoints chan []api.Endpoints)
	DeleteService(name string) error
	DeleteEndpoints(name string) error
}

type Registry

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

func NewRegistry

func NewRegistry() *Registry

TODO: just a quick fix for now

func (*Registry) CreateEndpoints

func (r *Registry) CreateEndpoints(endpoints *api.Endpoints) (*api.Endpoints, error)

CreateEndpoints stores endpoints implemented by a service endpoints are stored like "/flow/endpoints/{name}/host:port"

func (*Registry) CreateService

func (r *Registry) CreateService(service *api.Service) (*api.Service, error)

CreateService stores a new service to the registry

func (*Registry) DeleteEndpoints

func (r *Registry) DeleteEndpoints(name string) error

func (*Registry) DeleteService

func (r *Registry) DeleteService(name string) error

func (*Registry) GetEndpoints

func (r *Registry) GetEndpoints() ([]api.Endpoints, error)

GetEndpoints retrieves all endpoints stored in the registry

func (*Registry) GetService

func (r *Registry) GetService(key string) (*api.Service, error)

GetService retrieves a service from the registry

func (*Registry) GetServiceEndpoints

func (r *Registry) GetServiceEndpoints(key string) (*api.Endpoints, error)

GetServiceEndpoints retrieves the endpoints from a service by its keyspace

func (*Registry) GetServices

func (r *Registry) GetServices() ([]api.Service, error)

func (*Registry) WatchEndpoints

func (r *Registry) WatchEndpoints(endpointsch chan []api.Endpoints)

func (*Registry) WatchServices

func (r *Registry) WatchServices(servicesch chan []api.Service)

Jump to

Keyboard shortcuts

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