store

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2014 License: MIT Imports: 2 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register added in v0.4.1

func Register(name string, init InitFunc)

Types

type Adapter added in v0.4.1

type Adapter interface {
	Get(string) (string, bool)
	Set(string, string)
	Delete(string)
	All() map[string]string
}

type InitFunc added in v0.4.1

type InitFunc func() Adapter

func Load added in v0.4.1

func Load(name string) (InitFunc, error)

type MemoryStore

type MemoryStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*MemoryStore) All

func (s *MemoryStore) All() map[string]string

func (*MemoryStore) Delete

func (s *MemoryStore) Delete(key string)

func (*MemoryStore) Get

func (s *MemoryStore) Get(key string) (string, bool)

func (*MemoryStore) Set

func (s *MemoryStore) Set(key string, val string)

Jump to

Keyboard shortcuts

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