memory

package
v0.2.134 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryDatastore

type MemoryDatastore struct {
	// 本当は `proto.Message` を入れたいが、何故か中身がなかったのでとりあえずシリアライズする
	Data map[string][]byte
	// contains filtered or unexported fields
}

func NewMemoryDatastore

func NewMemoryDatastore() *MemoryDatastore

func (*MemoryDatastore) AddPrefix

func (m *MemoryDatastore) AddPrefix(prefix string) datastore.Datastore

func (*MemoryDatastore) Apply

func (m *MemoryDatastore) Apply(key string, pb proto.Message) error

func (*MemoryDatastore) Delete

func (m *MemoryDatastore) Delete(key string) error

func (MemoryDatastore) Get

func (m MemoryDatastore) Get(key string, pb proto.Message) error

func (*MemoryDatastore) IsLocked

func (m *MemoryDatastore) IsLocked(key string) bool

func (MemoryDatastore) List

func (m MemoryDatastore) List(f func(length int) []proto.Message) error

func (*MemoryDatastore) Lock

func (m *MemoryDatastore) Lock(key string) bool

func (*MemoryDatastore) Unlock

func (m *MemoryDatastore) Unlock(key string) bool

Jump to

Keyboard shortcuts

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