rbserver

package
v0.0.0-...-e9f930d Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DBExtension string = ".db"

DBExtension defines the extension used for the db files

Variables

This section is empty.

Functions

func GetHandler

func GetHandler(tree *rbtree.RBTree) func(http.ResponseWriter, *http.Request)

GetHandler takes a pointer to a red black tree and returns a callback retrieves a key if found in the tree

func NewTree

func NewTree() rbtree.RBTree

NewTree is a short function to make a new tree. This is a might be a bad code smell

func PutHandler

func PutHandler(tree *rbtree.RBTree, flushSize int) func(http.ResponseWriter, *http.Request)

PutHandler takes a pointer to a red black tree and returns a callback that adds the key value pair to the tree

Types

type Entry

type Entry struct {
	Key   string
	Value string
}

Entry represents the expected shape of the request body for put calls

type Key

type Key struct {
	Key string
}

Key represents the expected shape of the reuqest body for get calls

Jump to

Keyboard shortcuts

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