Documentation ¶
Overview ¶
Package storagepb contains protobuf definitions used by various storage implementations.
TODO(pavelkalinnikov, v2): SubtreeProto is used as:
a) database storage unit in multiple storage implementations; b) data exchange format between storage and application layers; c) nodes index data structure.
We should change it so that:
a) individual storage implementations define their own formats; b) data structures are defined in the application layer.
Index ¶
- Variables
- type SubtreeProto
- func (*SubtreeProto) Descriptor() ([]byte, []int)deprecated
- func (x *SubtreeProto) GetDepth() int32
- func (x *SubtreeProto) GetInternalNodeCount() uint32
- func (x *SubtreeProto) GetInternalNodes() map[string][]byte
- func (x *SubtreeProto) GetLeaves() map[string][]byte
- func (x *SubtreeProto) GetPrefix() []byte
- func (*SubtreeProto) ProtoMessage()
- func (x *SubtreeProto) ProtoReflect() protoreflect.Message
- func (x *SubtreeProto) Reset()
- func (x *SubtreeProto) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_storage_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type SubtreeProto ¶
type SubtreeProto struct { // subtree's prefix (must be a multiple of 8 bits) Prefix []byte `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"` // subtree's depth Depth int32 `protobuf:"varint,2,opt,name=depth,proto3" json:"depth,omitempty"` // map of suffix (within subtree) to subtree-leaf node hash Leaves map[string][]byte `` /* 153-byte string literal not displayed */ // Map of suffix (within subtree) to subtree-internal node hash. // This structure is usually used in RAM as a cache, the internal nodes of // the subtree are not generally stored. However internal nodes are stored for // partially filled log subtrees. InternalNodes map[string][]byte `` /* 188-byte string literal not displayed */ // Used as a crosscheck on the internal node map by recording its expected // size after loading and repopulation. InternalNodeCount uint32 `protobuf:"varint,6,opt,name=internal_node_count,json=internalNodeCount,proto3" json:"internal_node_count,omitempty"` // contains filtered or unexported fields }
SubtreeProto contains nodes of a subtree.
func (*SubtreeProto) Descriptor
deprecated
func (*SubtreeProto) Descriptor() ([]byte, []int)
Deprecated: Use SubtreeProto.ProtoReflect.Descriptor instead.
func (*SubtreeProto) GetDepth ¶
func (x *SubtreeProto) GetDepth() int32
func (*SubtreeProto) GetInternalNodeCount ¶
func (x *SubtreeProto) GetInternalNodeCount() uint32
func (*SubtreeProto) GetInternalNodes ¶
func (x *SubtreeProto) GetInternalNodes() map[string][]byte
func (*SubtreeProto) GetLeaves ¶
func (x *SubtreeProto) GetLeaves() map[string][]byte
func (*SubtreeProto) GetPrefix ¶
func (x *SubtreeProto) GetPrefix() []byte
func (*SubtreeProto) ProtoMessage ¶
func (*SubtreeProto) ProtoMessage()
func (*SubtreeProto) ProtoReflect ¶ added in v1.3.9
func (x *SubtreeProto) ProtoReflect() protoreflect.Message
func (*SubtreeProto) Reset ¶
func (x *SubtreeProto) Reset()
func (*SubtreeProto) String ¶
func (x *SubtreeProto) String() string
Click to show internal directories.
Click to hide internal directories.