Documentation ¶
Overview ¶
package memng provides in memory engine implementation, mostly used for test purposes
Index ¶
- func New(r *plugin.Registry) engine.Engine
- type Mem
- func (m *Mem) Close()
- func (m *Mem) DeleteBackend(bk engine.BackendKey) error
- func (m *Mem) DeleteFrontend(fk engine.FrontendKey) error
- func (m *Mem) DeleteHost(k engine.HostKey) error
- func (m *Mem) DeleteListener(lk engine.ListenerKey) error
- func (m *Mem) DeleteMiddleware(mk engine.MiddlewareKey) error
- func (m *Mem) DeleteServer(sk engine.ServerKey) error
- func (m *Mem) GetBackend(bk engine.BackendKey) (*engine.Backend, error)
- func (m *Mem) GetBackends() ([]engine.Backend, error)
- func (m *Mem) GetFrontend(k engine.FrontendKey) (*engine.Frontend, error)
- func (m *Mem) GetFrontends() ([]engine.Frontend, error)
- func (m *Mem) GetHost(k engine.HostKey) (*engine.Host, error)
- func (m *Mem) GetHosts() ([]engine.Host, error)
- func (m *Mem) GetListener(lk engine.ListenerKey) (*engine.Listener, error)
- func (m *Mem) GetListeners() ([]engine.Listener, error)
- func (m *Mem) GetMiddleware(mk engine.MiddlewareKey) (*engine.Middleware, error)
- func (m *Mem) GetMiddlewares(fk engine.FrontendKey) ([]engine.Middleware, error)
- func (m *Mem) GetRegistry() *plugin.Registry
- func (m *Mem) GetServer(sk engine.ServerKey) (*engine.Server, error)
- func (m *Mem) GetServers(bk engine.BackendKey) ([]engine.Server, error)
- func (m *Mem) Subscribe(changes chan interface{}, cancelC chan bool) error
- func (m *Mem) UpsertBackend(b engine.Backend) error
- func (m *Mem) UpsertFrontend(f engine.Frontend, d time.Duration) error
- func (m *Mem) UpsertHost(h engine.Host) error
- func (m *Mem) UpsertListener(l engine.Listener) error
- func (m *Mem) UpsertMiddleware(fk engine.FrontendKey, md engine.Middleware, d time.Duration) error
- func (m *Mem) UpsertServer(bk engine.BackendKey, srv engine.Server, d time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) DeleteBackend ¶
func (m *Mem) DeleteBackend(bk engine.BackendKey) error
func (*Mem) DeleteFrontend ¶
func (m *Mem) DeleteFrontend(fk engine.FrontendKey) 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) GetBackend ¶
func (*Mem) GetFrontend ¶
func (*Mem) GetListener ¶
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 (*Mem) GetServers ¶
func (*Mem) UpsertMiddleware ¶
func (m *Mem) UpsertMiddleware(fk engine.FrontendKey, md engine.Middleware, d time.Duration) error
func (*Mem) UpsertServer ¶
Click to show internal directories.
Click to hide internal directories.