backend

package
v0.0.0-...-267ac92 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	// Watch for changes in the backend and return where there is a change.
	Watch() error

	// Load all registered instances for the configured service
	Get() (ServiceRegistrations, error)
}

func NewEtcdBackend

func NewEtcdBackend(logger *logging.Logger, endpoints []string, path string) (Backend, error)

type ServiceInstance

type ServiceInstance struct {
	IP   string // IP address to connect to to reach the service instance
	Port int    // Port to connect to to reach the service instance
}

func (ServiceInstance) FullString

func (si ServiceInstance) FullString() string

type ServiceInstances

type ServiceInstances []ServiceInstance

func (ServiceInstances) FullString

func (list ServiceInstances) FullString() string

func (ServiceInstances) Len

func (list ServiceInstances) Len() int

Len is the number of elements in the collection.

func (ServiceInstances) Less

func (list ServiceInstances) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j.

func (ServiceInstances) Sort

func (list ServiceInstances) Sort()

func (ServiceInstances) Swap

func (list ServiceInstances) Swap(i, j int)

Swap swaps the elements with indexes i and j.

type ServiceRegistration

type ServiceRegistration struct {
	ServicePort int
	Instances   ServiceInstances
}

func (ServiceRegistration) FullString

func (sr ServiceRegistration) FullString() string

type ServiceRegistrations

type ServiceRegistrations []ServiceRegistration

func (ServiceRegistrations) Len

func (list ServiceRegistrations) Len() int

Len is the number of elements in the collection.

func (ServiceRegistrations) Less

func (list ServiceRegistrations) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j.

func (ServiceRegistrations) Sort

func (list ServiceRegistrations) Sort()

func (ServiceRegistrations) Swap

func (list ServiceRegistrations) Swap(i, j int)

Swap swaps the elements with indexes i and j.

Jump to

Keyboard shortcuts

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