Documentation ¶
Overview ¶
Package persist is a generated protocol buffer package.
It is generated from these files:
server/pfs/db/persist/persist.proto
It has these top-level messages:
Clock ClockID Repo BlockRef Diff Commit ProvenanceCommit
Index ¶
- Variables
- func ClockEq(c1 *Clock, c2 *Clock) bool
- func ClockToArray(clock gorethink.Term) []interface{}
- func DBClockAncestor(parent, child gorethink.Term) gorethink.Term
- func DBClockDescendent(child, parent gorethink.Term) gorethink.Term
- func FullClockBranch(fc FullClock) string
- func FullClockToArray(fullClock gorethink.Term) gorethink.Term
- func NewCommitID(repo string, clock *Clock) string
- type BlockRef
- type Clock
- type ClockID
- type ClockRange
- type ClockRangeList
- type Commit
- func (*Commit) Descriptor() ([]byte, []int)
- func (m *Commit) GetArchived() bool
- func (m *Commit) GetCancelled() bool
- func (m *Commit) GetFinished() *google_protobuf.Timestamp
- func (m *Commit) GetFullClock() []*Clock
- func (m *Commit) GetID() string
- func (m *Commit) GetProvenance() []*ProvenanceCommit
- func (m *Commit) GetRepo() string
- func (m *Commit) GetSizeBytes() uint64
- func (m *Commit) GetStarted() *google_protobuf.Timestamp
- func (*Commit) ProtoMessage()
- func (m *Commit) Reset()
- func (m *Commit) String() string
- type Diff
- func (d *Diff) CommitID() string
- func (*Diff) Descriptor() ([]byte, []int)
- func (m *Diff) GetBlockRefs() []*BlockRef
- func (m *Diff) GetClock() []*Clock
- func (m *Diff) GetDelete() bool
- func (m *Diff) GetFileType() FileType
- func (m *Diff) GetID() string
- func (m *Diff) GetModified() *google_protobuf.Timestamp
- func (m *Diff) GetPath() string
- func (m *Diff) GetRepo() string
- func (m *Diff) GetSizeBytes() uint64
- func (*Diff) ProtoMessage()
- func (m *Diff) Reset()
- func (m *Diff) String() string
- type FileType
- type FullClock
- type ProvenanceCommit
- type Repo
Constants ¶
This section is empty.
Variables ¶
var FileType_name = map[int32]string{
0: "NONE",
1: "FILE",
2: "DIR",
}
var FileType_value = map[string]int32{
"NONE": 0,
"FILE": 1,
"DIR": 2,
}
Functions ¶
func ClockToArray ¶
ClockToArray is the same as Clock.ToArray except that it operates on a gorethink Term
func DBClockAncestor ¶ added in v1.2.4
DBClockAncestor returns whether one FullClock is the ancestor of the other, assuming both are rethinkdb terms. A FullClock is the ancestor of itself.
func DBClockDescendent ¶
DBClockDescendent returns whether one FullClock is the descendent of the other, assuming both are rethinkdb terms
func FullClockBranch ¶
FullClockBranch returns the branch of the last element of the FullClock
func FullClockToArray ¶
FullClockToArray converts a FullClock to an array.
func NewCommitID ¶
NewCommitID generates a commitID to be used in a database from a repo and a clock
Types ¶
type BlockRef ¶
type BlockRef struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` Lower uint64 `protobuf:"varint,2,opt,name=lower,proto3" json:"lower,omitempty"` Upper uint64 `protobuf:"varint,3,opt,name=upper,proto3" json:"upper,omitempty"` }
func (*BlockRef) Descriptor ¶
func (*BlockRef) ProtoMessage ¶
func (*BlockRef) ProtoMessage()
type Clock ¶
type Clock struct { // a document either has these two fields Branch string `protobuf:"bytes,1,opt,name=branch,proto3" json:"branch,omitempty"` Clock uint64 `protobuf:"varint,2,opt,name=clock,proto3" json:"clock,omitempty"` }
func FullClockHead ¶
FullClockHead returns the last element of a FullClock
func StringToClock ¶
StringToClock converts a string like "master/2" to a clock
func (*Clock) Descriptor ¶
func (*Clock) ProtoMessage ¶
func (*Clock) ProtoMessage()
func (*Clock) ReadableCommitID ¶
ReadableCommitID returns a human-friendly commit ID for displaying purposes.
type ClockID ¶
type ClockID struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` Branch string `protobuf:"bytes,3,opt,name=branch,proto3" json:"branch,omitempty"` Clock uint64 `protobuf:"varint,4,opt,name=clock,proto3" json:"clock,omitempty"` }
func (*ClockID) Descriptor ¶
func (*ClockID) ProtoMessage ¶
func (*ClockID) ProtoMessage()
type ClockRange ¶
ClockRange represents a range of clocks
type ClockRangeList ¶
type ClockRangeList struct {
// contains filtered or unexported fields
}
ClockRangeList is an ordered list of ClockRanges
func NewClockRangeList ¶
func NewClockRangeList(from FullClock, to FullClock) ClockRangeList
NewClockRangeList creates a ClockRangeList that represents all clock ranges in between the two given FullClocks.
func (*ClockRangeList) AddClock ¶
func (l *ClockRangeList) AddClock(c *Clock)
AddClock adds a range [0, c.Clock]
func (*ClockRangeList) AddFullClock ¶
func (l *ClockRangeList) AddFullClock(fc FullClock)
AddFullClock adds a FullClock to the ClockRange
func (*ClockRangeList) Ranges ¶
func (l *ClockRangeList) Ranges() []*ClockRange
Ranges return the clock ranges stored in a ClockRangeList
func (*ClockRangeList) SubClock ¶
func (l *ClockRangeList) SubClock(c *Clock)
SubClock substracts a range [0, c.Clock]
func (*ClockRangeList) SubFullClock ¶
func (l *ClockRangeList) SubFullClock(fc FullClock)
SubFullClock subtracts a FullClock from the ClockRange
type Commit ¶
type Commit struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` FullClock []*Clock `protobuf:"bytes,3,rep,name=full_clock,json=fullClock" json:"full_clock,omitempty"` Started *google_protobuf.Timestamp `protobuf:"bytes,4,opt,name=started" json:"started,omitempty"` Finished *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=finished" json:"finished,omitempty"` Cancelled bool `protobuf:"varint,6,opt,name=cancelled,proto3" json:"cancelled,omitempty"` Archived bool `protobuf:"varint,7,opt,name=archived,proto3" json:"archived,omitempty"` // The complete set of commits that are the provenance of this commit. // We store the complete set of provenance as opposed to just the immediate // provenance in order to make ListCommit(provenance) fast. Provenance []*ProvenanceCommit `protobuf:"bytes,8,rep,name=provenance" json:"provenance,omitempty"` SizeBytes uint64 `protobuf:"varint,9,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` }
func (*Commit) Descriptor ¶
func (*Commit) GetArchived ¶ added in v1.3.5
func (*Commit) GetCancelled ¶ added in v1.3.5
func (*Commit) GetFinished ¶
func (m *Commit) GetFinished() *google_protobuf.Timestamp
func (*Commit) GetFullClock ¶
func (*Commit) GetProvenance ¶
func (m *Commit) GetProvenance() []*ProvenanceCommit
func (*Commit) GetSizeBytes ¶ added in v1.3.5
func (*Commit) GetStarted ¶
func (m *Commit) GetStarted() *google_protobuf.Timestamp
func (*Commit) ProtoMessage ¶
func (*Commit) ProtoMessage()
type Diff ¶
type Diff struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` // block_refs and delete cannot both be set BlockRefs []*BlockRef `protobuf:"bytes,4,rep,name=block_refs,json=blockRefs" json:"block_refs,omitempty"` Delete bool `protobuf:"varint,5,opt,name=delete,proto3" json:"delete,omitempty"` SizeBytes uint64 `protobuf:"varint,6,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` Clock []*Clock `protobuf:"bytes,7,rep,name=clock" json:"clock,omitempty"` FileType FileType `protobuf:"varint,8,opt,name=file_type,json=fileType,proto3,enum=FileType" json:"file_type,omitempty"` Modified *google_protobuf.Timestamp `protobuf:"bytes,9,opt,name=modified" json:"modified,omitempty"` }
func (*Diff) Descriptor ¶
func (*Diff) GetBlockRefs ¶
func (*Diff) GetFileType ¶ added in v1.3.5
func (*Diff) GetModified ¶
func (m *Diff) GetModified() *google_protobuf.Timestamp
func (*Diff) GetSizeBytes ¶ added in v1.3.5
func (*Diff) ProtoMessage ¶
func (*Diff) ProtoMessage()
type FullClock ¶
type FullClock []*Clock
FullClock is an array of clocks, e.g. [(master, 2), (foo, 3)]
func FullClockParent ¶
FullClockParent returns the parent of a full clock, or nil if the clock has no parent [(master, 2), (foo, 1)] -> [(master, 2), (foo, 0)] [(master, 2), (foo, 0)] -> [(master, 2)]
type ProvenanceCommit ¶
type ProvenanceCommit struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` }
func (*ProvenanceCommit) Descriptor ¶
func (*ProvenanceCommit) Descriptor() ([]byte, []int)
func (*ProvenanceCommit) GetID ¶ added in v1.3.5
func (m *ProvenanceCommit) GetID() string
func (*ProvenanceCommit) GetRepo ¶ added in v1.3.5
func (m *ProvenanceCommit) GetRepo() string
func (*ProvenanceCommit) ProtoMessage ¶
func (*ProvenanceCommit) ProtoMessage()
func (*ProvenanceCommit) Reset ¶
func (m *ProvenanceCommit) Reset()
func (*ProvenanceCommit) String ¶
func (m *ProvenanceCommit) String() string
type Repo ¶
type Repo struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Created *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=created" json:"created,omitempty"` SizeBytes uint64 `protobuf:"varint,3,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` // The immediate provenance of this repo Provenance []string `protobuf:"bytes,4,rep,name=provenance" json:"provenance,omitempty"` }
func (*Repo) Descriptor ¶
func (*Repo) GetCreated ¶
func (m *Repo) GetCreated() *google_protobuf.Timestamp
func (*Repo) GetProvenance ¶ added in v1.3.5
func (*Repo) GetSizeBytes ¶ added in v1.3.5
func (*Repo) ProtoMessage ¶
func (*Repo) ProtoMessage()