Documentation ¶
Overview ¶
commit package provides commit logs for storing mutations, as they arrive at the server. Mutations also get stored in memory within posting.List. So, commit logs are useful to handle machine crashes, and re-init of a posting list. This package provides functionality to write to a rotating log, and a way to quickly filter relevant entries corresponding to an attribute.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var E_READ = errors.New("Unable to read")
View Source
var E_WRITE = errors.New("Unable to write")
Functions ¶
Types ¶
type ByTimestamp ¶
type ByTimestamp []*logFile
func (ByTimestamp) Len ¶
func (b ByTimestamp) Len() int
func (ByTimestamp) Less ¶
func (b ByTimestamp) Less(i, j int) bool
func (ByTimestamp) Swap ¶
func (b ByTimestamp) Swap(i, j int)
type Cache ¶
func (*Cache) LastAccessedInSeconds ¶
type LogIterator ¶
type Logger ¶
type Logger struct { // Sync every N logs. A value of zero or less would mean // sync every append to file. SyncEvery int // Sync every d duration. SyncDur time.Duration sync.RWMutex // contains filtered or unexported fields }
func (*Logger) DeleteCacheOlderThan ¶
func (*Logger) StreamEntries ¶
func (l *Logger) StreamEntries(afterTs int64, hash uint32, iter LogIterator) error
Click to show internal directories.
Click to hide internal directories.