Documentation ¶
Index ¶
- Constants
- Variables
- type EventType
- type OpLog
- func (o *OpLog) Add(op *v1.Operation) error
- func (o *OpLog) BulkAdd(ops []*v1.Operation) error
- func (o *OpLog) Close() error
- func (o *OpLog) Delete(ids ...int64) error
- func (o *OpLog) ForAll(do func(op *v1.Operation) error) error
- func (o *OpLog) ForEachByPlan(planId string, collector indexutil.Collector, do func(op *v1.Operation) error) error
- func (o *OpLog) ForEachByRepo(repoId string, collector indexutil.Collector, do func(op *v1.Operation) error) error
- func (o *OpLog) ForEachBySnapshotId(snapshotId string, collector indexutil.Collector, ...) error
- func (o *OpLog) Get(id int64) (*v1.Operation, error)
- func (o *OpLog) Scan(onIncomplete func(op *v1.Operation)) error
- func (o *OpLog) Subscribe(callback *func(*v1.Operation, *v1.Operation))
- func (o *OpLog) Unsubscribe(callback *func(*v1.Operation, *v1.Operation))
- func (o *OpLog) Update(op *v1.Operation) error
Constants ¶
Variables ¶
View Source
var ( SystemBucket = []byte("oplog.system") // system stores metadata OpLogBucket = []byte("oplog.log") // oplog stores existant operations. RepoIndexBucket = []byte("oplog.repo_idx") // repo_index tracks IDs of operations affecting a given repo PlanIndexBucket = []byte("oplog.plan_idx") // plan_index tracks IDs of operations affecting a given plan SnapshotIndexBucket = []byte("oplog.snapshot_idx") // snapshot_index tracks IDs of operations affecting a given snapshot )
View Source
var ErrNotExist = errors.New("operation does not exist")
Functions ¶
This section is empty.
Types ¶
type OpLog ¶
type OpLog struct {
// contains filtered or unexported fields
}
OpLog represents a log of operations performed. Operations are indexed by repo and plan.
func (*OpLog) ForEachByPlan ¶
func (*OpLog) ForEachByRepo ¶
func (*OpLog) ForEachBySnapshotId ¶
func (*OpLog) Scan ¶
Scan checks the log for incomplete operations. Should only be called at startup.
func (*OpLog) Unsubscribe ¶
Click to show internal directories.
Click to hide internal directories.