Version: v0.7.0 Latest Latest

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

Go to latest
Published: Dec 22, 2014 License: Apache-2.0 Imports: 4 Imported by: 0



Provides in memory backend implementation, mostly used for test purposes



This section is empty.


This section is empty.


This section is empty.


type MemBackend

type MemBackend struct {
	Hosts     []*Host
	Upstreams []*Upstream
	Registry  *Registry
	ChangesC  chan interface{}
	ErrorsC   chan error
	// contains filtered or unexported fields

func NewMemBackend

func NewMemBackend(r *Registry) *MemBackend

func (*MemBackend) AddEndpoint

func (m *MemBackend) AddEndpoint(e *Endpoint) (*Endpoint, error)

func (*MemBackend) AddHost

func (m *MemBackend) AddHost(h *Host) (*Host, error)

func (*MemBackend) AddHostListener

func (m *MemBackend) AddHostListener(hostname string, listener *Listener) (*Listener, error)

func (*MemBackend) AddLocation

func (m *MemBackend) AddLocation(loc *Location) (*Location, error)

func (*MemBackend) AddLocationMiddleware

func (m *MemBackend) AddLocationMiddleware(hostname, locationId string, mi *MiddlewareInstance) (*MiddlewareInstance, error)

func (*MemBackend) AddUpstream

func (m *MemBackend) AddUpstream(up *Upstream) (*Upstream, error)

func (*MemBackend) Close

func (m *MemBackend) Close()

func (*MemBackend) DeleteEndpoint

func (m *MemBackend) DeleteEndpoint(upstreamId, id string) error

func (*MemBackend) DeleteHost

func (m *MemBackend) DeleteHost(name string) error

func (*MemBackend) DeleteHostListener

func (m *MemBackend) DeleteHostListener(hostname string, listenerId string) error

func (*MemBackend) DeleteLocation

func (m *MemBackend) DeleteLocation(hostname, id string) error

func (*MemBackend) DeleteLocationMiddleware

func (m *MemBackend) DeleteLocationMiddleware(hostname, locationId, mType, id string) error

func (*MemBackend) DeleteUpstream

func (m *MemBackend) DeleteUpstream(id string) error

func (*MemBackend) GetEndpoint

func (m *MemBackend) GetEndpoint(upstreamId, id string) (*Endpoint, error)

func (*MemBackend) GetHost

func (m *MemBackend) GetHost(name string) (*Host, error)

func (*MemBackend) GetHosts

func (m *MemBackend) GetHosts() ([]*Host, error)

func (*MemBackend) GetLocation

func (m *MemBackend) GetLocation(hostname, id string) (*Location, error)

func (*MemBackend) GetLocationMiddleware

func (m *MemBackend) GetLocationMiddleware(hostname, locationId string, mType, id string) (*MiddlewareInstance, error)

func (*MemBackend) GetRegistry

func (m *MemBackend) GetRegistry() *Registry

func (*MemBackend) GetUpstream

func (m *MemBackend) GetUpstream(id string) (*Upstream, error)

func (*MemBackend) GetUpstreams

func (m *MemBackend) GetUpstreams() ([]*Upstream, error)

func (*MemBackend) UpdateHostKeyPair

func (m *MemBackend) UpdateHostKeyPair(hostname string, keyPair *KeyPair) (*Host, error)

func (*MemBackend) UpdateLocationMiddleware

func (m *MemBackend) UpdateLocationMiddleware(hostname, locationId string, mi *MiddlewareInstance) (*MiddlewareInstance, error)

func (*MemBackend) UpdateLocationOptions

func (m *MemBackend) UpdateLocationOptions(hostname, id string, o LocationOptions) (*Location, error)

func (*MemBackend) UpdateLocationUpstream

func (m *MemBackend) UpdateLocationUpstream(hostname, id string, upstreamId string) (*Location, error)

func (*MemBackend) UpdateUpstreamOptions

func (m *MemBackend) UpdateUpstreamOptions(id string, o UpstreamOptions) (*Upstream, error)

func (*MemBackend) WatchChanges

func (m *MemBackend) WatchChanges(changes chan interface{}, cancelC chan bool) error

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL