Documentation ¶
Overview ¶
Provides in memory backend implementation, mostly used for test purposes
Index ¶
- type MemBackend
- func (m *MemBackend) AddEndpoint(e *Endpoint) (*Endpoint, error)
- func (m *MemBackend) AddHost(h *Host) (*Host, error)
- func (m *MemBackend) AddHostListener(hostname string, listener *Listener) (*Listener, error)
- func (m *MemBackend) AddLocation(loc *Location) (*Location, error)
- func (m *MemBackend) AddLocationMiddleware(hostname, locationId string, mi *MiddlewareInstance) (*MiddlewareInstance, error)
- func (m *MemBackend) AddUpstream(up *Upstream) (*Upstream, error)
- func (m *MemBackend) Close()
- func (m *MemBackend) DeleteEndpoint(upstreamId, id string) error
- func (m *MemBackend) DeleteHost(name string) error
- func (m *MemBackend) DeleteHostListener(hostname string, listenerId string) error
- func (m *MemBackend) DeleteLocation(hostname, id string) error
- func (m *MemBackend) DeleteLocationMiddleware(hostname, locationId, mType, id string) error
- func (m *MemBackend) DeleteUpstream(id string) error
- func (m *MemBackend) GetEndpoint(upstreamId, id string) (*Endpoint, error)
- func (m *MemBackend) GetHost(name string) (*Host, error)
- func (m *MemBackend) GetHosts() ([]*Host, error)
- func (m *MemBackend) GetLocation(hostname, id string) (*Location, error)
- func (m *MemBackend) GetLocationMiddleware(hostname, locationId string, mType, id string) (*MiddlewareInstance, error)
- func (m *MemBackend) GetRegistry() *Registry
- func (m *MemBackend) GetUpstream(id string) (*Upstream, error)
- func (m *MemBackend) GetUpstreams() ([]*Upstream, error)
- func (m *MemBackend) UpdateHostKeyPair(hostname string, keyPair *KeyPair) (*Host, error)
- func (m *MemBackend) UpdateLocationMiddleware(hostname, locationId string, mi *MiddlewareInstance) (*MiddlewareInstance, error)
- func (m *MemBackend) UpdateLocationOptions(hostname, id string, o LocationOptions) (*Location, error)
- func (m *MemBackend) UpdateLocationUpstream(hostname, id string, upstreamId string) (*Location, error)
- func (m *MemBackend) UpdateUpstreamOptions(id string, o UpstreamOptions) (*Upstream, error)
- func (m *MemBackend) WatchChanges(changes chan interface{}, cancelC chan bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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
Click to show internal directories.
Click to hide internal directories.