handler

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: Unlicense Imports: 2 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Start(<-chan string, *loader.Loader) <-chan bool
	Load(string) error
	Get(key []byte) ([]byte, error)
}

Handler defines an interface to a handler

type Multiplexer

type Multiplexer struct {
	// contains filtered or unexported fields
}

Multiplexer represents a handler multiplexer

func NewMultiplexer

func NewMultiplexer() *Multiplexer

NewMultiplexer creates a Multiplexer

func (*Multiplexer) GetHandler

func (m *Multiplexer) GetHandler(name string) (Handler, error)

GetHandler returns a Handler with given name

func (*Multiplexer) GetNSHandler

func (m *Multiplexer) GetNSHandler(name string) (NSHandler, error)

GetNSHandler returns a NSHandler with given name

func (*Multiplexer) RegisterHandler

func (m *Multiplexer) RegisterHandler(name string, hdr Handler) error

RegisterHandler registers a Handler to Multiplexer

func (*Multiplexer) RegisterNSHandler

func (m *Multiplexer) RegisterNSHandler(name string, hdr NSHandler) error

RegisterNSHandler registers a NSHandler to Multiplexer

type NSHandler

type NSHandler interface {
	Handler
	GetNS(ns, key []byte) ([]byte, error)
}

NSHandler defines an interface to a handler with namespace support

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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