datastore

package
v0.0.0-...-c65ff4a Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2017 License: MIT Imports: 0 Imported by: 4

Documentation

Overview

Package datastore implements datastore (key, value pair) interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datastore

type Datastore interface {
	Get(key string) (value []byte, found bool)
}

Datastore is an interface for retrieving value using key.

type Simple

type Simple struct {
	Key   string
	Value []byte
}

Simple is a simple struct stores only one key, value pair. This struct implement Datastore interface.

func (*Simple) Get

func (d *Simple) Get(key string) ([]byte, bool)

Simple.Get returns value using key.

Jump to

Keyboard shortcuts

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