Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
Index uint64
Type int32
Term uint64
Timestamp time.Time
Tags []string
Data []byte
}
An Entry represents a single record in the storage system. It is used by many packages as the basis of the data model
func DecodeEntry ¶
DecodeEntry turns a protobuf created by EncodeEntry back into an Entry. It will return an error if the specified array is not a valid protobuf for the Entry type.
func DecodeEntryFromPb ¶
DecodeEntryFromPb parses the special struct from a protobuf entry and turns it into a regular Entry.
func (*Entry) Encode ¶
Encode encodes an entry in to a byte array using the protobuf defined in this package.
func (*Entry) EncodePb ¶
EncodePb turns a regular Entry struct into the special struct required in order to generate a protobuf.
func (*Entry) MatchesTag ¶
MatchesTag returns true if the specified entry contains the tag from the "tag" argument.
func (*Entry) MatchesTags ¶
MatchesTags returns true if the specified entry contains all the tags in the "tags" array.