radixhandler

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2018 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(stg storage.Storage, logger *log.Logger) handler.Handler

New creates and returns a handler

Types

type Handler

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

Handler represents a radix handler

func (Handler) Get

func (h Handler) Get(key []byte) ([]byte, []byte, error)

Get finds the longest prefix for given key, and finds value by prefix

func (*Handler) Load

func (h *Handler) Load(file string) error

Load loads data into storage, and creates a radix tree

func (*Handler) Start

func (h *Handler) Start(filein <-chan string, l *loader.Loader) <-chan bool

Start starts a handler goroutine

Jump to

Keyboard shortcuts

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