memng

package
v0.8.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

package memng provides in memory engine implementation, mostly used for test purposes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(r *plugin.Registry) engine.Engine

Types

type Mem

type Mem struct {
	Hosts     map[engine.HostKey]engine.Host
	Frontends map[engine.FrontendKey]engine.Frontend
	Backends  map[engine.BackendKey]engine.Backend
	Listeners map[engine.ListenerKey]engine.Listener

	Middlewares map[engine.FrontendKey][]engine.Middleware
	Servers     map[engine.BackendKey][]engine.Server

	Registry *plugin.Registry
	ChangesC chan interface{}
	ErrorsC  chan error
}

Mem is exported to provide easy access to its internals

func (*Mem) Close

func (m *Mem) Close()

func (*Mem) DeleteBackend

func (m *Mem) DeleteBackend(bk engine.BackendKey) error

func (*Mem) DeleteFrontend

func (m *Mem) DeleteFrontend(fk engine.FrontendKey) error

func (*Mem) DeleteHost

func (m *Mem) DeleteHost(k engine.HostKey) error

func (*Mem) DeleteListener

func (m *Mem) DeleteListener(lk engine.ListenerKey) error

func (*Mem) DeleteMiddleware

func (m *Mem) DeleteMiddleware(mk engine.MiddlewareKey) error

func (*Mem) DeleteServer

func (m *Mem) DeleteServer(sk engine.ServerKey) error

func (*Mem) GetBackend

func (m *Mem) GetBackend(bk engine.BackendKey) (*engine.Backend, error)

func (*Mem) GetBackends

func (m *Mem) GetBackends() ([]engine.Backend, error)

func (*Mem) GetFrontend

func (m *Mem) GetFrontend(k engine.FrontendKey) (*engine.Frontend, error)

func (*Mem) GetFrontends

func (m *Mem) GetFrontends() ([]engine.Frontend, error)

func (*Mem) GetHost

func (m *Mem) GetHost(k engine.HostKey) (*engine.Host, error)

func (*Mem) GetHosts

func (m *Mem) GetHosts() ([]engine.Host, error)

func (*Mem) GetListener

func (m *Mem) GetListener(lk engine.ListenerKey) (*engine.Listener, error)

func (*Mem) GetListeners

func (m *Mem) GetListeners() ([]engine.Listener, error)

func (*Mem) GetMiddleware

func (m *Mem) GetMiddleware(mk engine.MiddlewareKey) (*engine.Middleware, error)

func (*Mem) GetMiddlewares

func (m *Mem) GetMiddlewares(fk engine.FrontendKey) ([]engine.Middleware, error)

func (*Mem) GetRegistry

func (m *Mem) GetRegistry() *plugin.Registry

func (*Mem) GetServer

func (m *Mem) GetServer(sk engine.ServerKey) (*engine.Server, error)

func (*Mem) GetServers

func (m *Mem) GetServers(bk engine.BackendKey) ([]engine.Server, error)

func (*Mem) Subscribe

func (m *Mem) Subscribe(changes chan interface{}, cancelC chan bool) error

func (*Mem) UpsertBackend

func (m *Mem) UpsertBackend(b engine.Backend) error

func (*Mem) UpsertFrontend

func (m *Mem) UpsertFrontend(f engine.Frontend, d time.Duration) error

func (*Mem) UpsertHost

func (m *Mem) UpsertHost(h engine.Host) error

func (*Mem) UpsertListener

func (m *Mem) UpsertListener(l engine.Listener) error

func (*Mem) UpsertMiddleware

func (m *Mem) UpsertMiddleware(fk engine.FrontendKey, md engine.Middleware, d time.Duration) error

func (*Mem) UpsertServer

func (m *Mem) UpsertServer(bk engine.BackendKey, srv engine.Server, d time.Duration) error

Jump to

Keyboard shortcuts

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