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) MatchesAllTags ¶ added in v0.5.6
MatchesAllTags returns true if the specified entry contains all the tags in the "tags" array. It will always return true for an empty "tags" array.
func (*Entry) MatchesAnyTag ¶ added in v0.5.6
MatchesAnyTag returns true if the specified entry contains any one of the tags in the "tags" array. It will always return true for an empty "tags" array.
func (*Entry) MatchesTag ¶
MatchesTag returns true if the specified entry contains the tag from the "tag" argument.