Documentation ¶
Index ¶
- type Block
- type BlockManifest
- type Manifest
- type Part
- type PartManifest
- type ReplNodeState
- type Slot
- type Store
- func (s *Store) Count(key string) uint64
- func (s *Store) Del(key string)
- func (s *Store) Get(key string) (*Slot, bool)
- func (s *Store) List(key string, bufferSize int) <-chan string
- func (st *Store) Persist(dir string, period int)
- func (st *Store) ServeConn(conn net.Conn, authSecret string, bufferSize int)
- func (s *Store) Set(key string, slot Slot, repl bool)
- func (st *Store) WriteAllBlocks(dir string)
- type VersionVector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { Id []byte Mutex *sync.RWMutex Slots map[string]Slot MustWrite bool ReplState map[uint64]*ReplNodeState // replNodeId }
Second layer of division of the Store
Child of Part ¶
Contains the slots with values and metadata ¶
MustWrite flag is true if changes have been made since last disk-write. MustSync flag is true for each node if changes have been made since last sync
func (*Block) ReadFromFile ¶
Decodes block file & populates slots
func (*Block) WriteToFile ¶
Encodes block slots as gob, and writes to file
type BlockManifest ¶
type BlockManifest struct {
BlockId []byte
}
type PartManifest ¶
type PartManifest struct { PartId []byte Blocks []BlockManifest }
type ReplNodeState ¶
type ReplNodeState struct {
MustSync bool
}
type Store ¶
func (*Store) List ¶
Returns channel for list of matching keys
If a namespace is given only that namespace will be searched
func (*Store) Persist ¶
While watch() only takes care of writing to partitions, will only watch if persistence is enabled
func (*Store) WriteAllBlocks ¶
type VersionVector ¶
Click to show internal directories.
Click to hide internal directories.