package storagepb
import "github.com/google/trillian/storage/storagepb"
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)
- 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
Variables ¶
var File_storage_proto protoreflect.FileDescriptor
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 `protobuf:"bytes,4,rep,name=leaves,proto3" json:"leaves,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 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 `protobuf:"bytes,5,rep,name=internal_nodes,json=internalNodes,proto3" json:"internal_nodes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 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 ¶
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 ¶
func (x *SubtreeProto) ProtoReflect() protoreflect.Message
func (*SubtreeProto) Reset ¶
func (x *SubtreeProto) Reset()
func (*SubtreeProto) String ¶
func (x *SubtreeProto) String() string
Source Files ¶
- Version
- v1.7.1 (latest)
- Published
- Jan 9, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 5 days ago –
Tools for package owners.