memoryStore

package
v0.0.0-...-250bf39 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package memoryStore is a generated protocol buffer package.

It is generated from these files:

memoryStore.proto

It has these top-level messages:

UniqueStorageValue
MessageValue
UniqueStorage

Index

Constants

This section is empty.

Variables

View Source
var MessageValue_OPERATION_name = map[int32]string{
	0: "CAS",
}
View Source
var MessageValue_OPERATION_value = map[string]int32{
	"CAS": 0,
}

Functions

This section is empty.

Types

type MessageValue

type MessageValue struct {
	Operation  MessageValue_OPERATION `protobuf:"varint,1,opt,name=operation,enum=memoryStore.MessageValue_OPERATION" json:"operation,omitempty"`
	Key        string                 `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
	Value      string                 `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
	Expiration uint32                 `protobuf:"varint,4,opt,name=expiration" json:"expiration,omitempty"`
}

func (*MessageValue) Descriptor

func (*MessageValue) Descriptor() ([]byte, []int)

func (*MessageValue) GetExpiration

func (m *MessageValue) GetExpiration() uint32

func (*MessageValue) GetKey

func (m *MessageValue) GetKey() string

func (*MessageValue) GetOperation

func (m *MessageValue) GetOperation() MessageValue_OPERATION

func (*MessageValue) GetValue

func (m *MessageValue) GetValue() string

func (*MessageValue) ProtoMessage

func (*MessageValue) ProtoMessage()

func (*MessageValue) Reset

func (m *MessageValue) Reset()

func (*MessageValue) String

func (m *MessageValue) String() string

type MessageValue_OPERATION

type MessageValue_OPERATION int32
const (
	MessageValue_CAS MessageValue_OPERATION = 0
)

func (MessageValue_OPERATION) EnumDescriptor

func (MessageValue_OPERATION) EnumDescriptor() ([]byte, []int)

func (MessageValue_OPERATION) String

func (x MessageValue_OPERATION) String() string

type Store

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

func New

func New(storagePath string, raftAddress string, singleMode bool) *Store

New returns a new Store.

func (*Store) CheckNSet

func (s *Store) CheckNSet(key string, value string, expiration time.Time) (bool, string, error)

func (*Store) Count

func (s *Store) Count() int

func (*Store) IsLeader

func (s *Store) IsLeader() bool

func (*Store) Join

func (s *Store) Join(addr string) error

func (*Store) Open

func (s *Store) Open() error

type UniqueStorage

type UniqueStorage struct {
	Items map[string]*UniqueStorageValue `` /* 130-byte string literal not displayed */
}

func (*UniqueStorage) Descriptor

func (*UniqueStorage) Descriptor() ([]byte, []int)

func (*UniqueStorage) GetItems

func (m *UniqueStorage) GetItems() map[string]*UniqueStorageValue

func (*UniqueStorage) Persist

func (f *UniqueStorage) Persist(sink raft.SnapshotSink) error

func (*UniqueStorage) ProtoMessage

func (*UniqueStorage) ProtoMessage()

func (*UniqueStorage) Release

func (f *UniqueStorage) Release()

func (*UniqueStorage) Reset

func (m *UniqueStorage) Reset()

func (*UniqueStorage) String

func (m *UniqueStorage) String() string

type UniqueStorageValue

type UniqueStorageValue struct {
	Value      string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
	Expiration uint32 `protobuf:"varint,2,opt,name=expiration" json:"expiration,omitempty"`
}

func (*UniqueStorageValue) Descriptor

func (*UniqueStorageValue) Descriptor() ([]byte, []int)

func (*UniqueStorageValue) GetExpiration

func (m *UniqueStorageValue) GetExpiration() uint32

func (*UniqueStorageValue) GetValue

func (m *UniqueStorageValue) GetValue() string

func (*UniqueStorageValue) ProtoMessage

func (*UniqueStorageValue) ProtoMessage()

func (*UniqueStorageValue) Reset

func (m *UniqueStorageValue) Reset()

func (*UniqueStorageValue) String

func (m *UniqueStorageValue) String() string

Jump to

Keyboard shortcuts

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