storage

package
v0.0.0-...-90a1d44 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetaPrefix_Table          MetaPrefix = 't'
	MetaPrefix_Column                    = 'c'
	MetaPrefix_MyId                      = '@'
	MetaPrefix_Log                       = 'l'
	MetaPrefix_StableStore               = 's'
	MetaPrefix_Datum                     = '>'
	MetaPrefix_ObjectSequence            = '+'
)

Variables

This section is empty.

Functions

func GetMyNodeIdPath

func GetMyNodeIdPath() []byte

Types

type Action

type Action struct {
	Type  ActionType
	Key   []byte
	Value []byte
}

func (*Action) Decode

func (i *Action) Decode(src []byte) error

func (*Action) Encode

func (i *Action) Encode() []byte

type ActionType

type ActionType uint8
const (
	ActionTypeNone   ActionType = 0
	ActionTypeSet    ActionType = 1
	ActionTypeDelete ActionType = 2
)

type Column

type Column struct {
	ColumnID   uint8
	TableID    uint8
	ColumnName string
	ColumnType types.Type

	PrimaryKey bool
}

func (*Column) Decode

func (i *Column) Decode(src []byte) error

func (Column) Encode

func (i Column) Encode() []byte

func (Column) ObjectIdPrefix

func (i Column) ObjectIdPrefix() []byte

func (Column) Path

func (i Column) Path() []byte

func (Column) Prefix

func (i Column) Prefix() []byte

func (Column) Size

func (i Column) Size() int

type Datum

type Datum struct {
	PrimaryKeyID uint64
	TableID      uint8
	ColumnID     uint8

	Value []byte
}

func (Datum) Encode

func (i Datum) Encode() []byte

func (Datum) Path

func (i Datum) Path() []byte

type Log

type Log struct {
	raft.Log
}

func NewLogFromRaft

func NewLogFromRaft(log *raft.Log) *Log

func (*Log) Decode

func (i *Log) Decode(src []byte) error

func (*Log) Encode

func (i *Log) Encode() []byte

func (Log) Path

func (i Log) Path() []byte

type MetaPrefix

type MetaPrefix = byte

type MyNodeId

type MyNodeId struct {
	NodeId uint64
}

type Node

type Node struct {
}

type ObjectSequence

type ObjectSequence struct {
	Key  []byte
	Next uint8
}

func (*ObjectSequence) Decode

func (i *ObjectSequence) Decode(src []byte) error

func (ObjectSequence) Encode

func (i ObjectSequence) Encode() []byte

func (ObjectSequence) Path

func (i ObjectSequence) Path() []byte

type Table

type Table struct {
	TableID   uint8
	TableName string
}

func (*Table) Decode

func (i *Table) Decode(src []byte) error

func (Table) Encode

func (i Table) Encode() []byte

func (Table) ObjectIdPrefix

func (i Table) ObjectIdPrefix() []byte

func (Table) Path

func (i Table) Path() []byte

func (Table) Prefix

func (i Table) Prefix() []byte

type Transaction

type Transaction struct {
	Timestamp uint64
	Actions   []Action
}

func (*Transaction) Decode

func (i *Transaction) Decode(src []byte) error

func (*Transaction) Encode

func (i *Transaction) Encode() []byte

Jump to

Keyboard shortcuts

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