Documentation ¶
Index ¶
- type BoltTracker
- func (t *BoltTracker) Close() error
- func (t *BoltTracker) Connect() error
- func (t *BoltTracker) CreateBucket(bucketName string) error
- func (t *BoltTracker) Enabled() bool
- func (t *BoltTracker) Get(bucketName string, key []byte) []byte
- func (t *BoltTracker) GetKeyValueListForBucket(bucketNames []string) []TrackerKeyValue
- func (t *BoltTracker) GetKeysForBucket(bucketName string) [][]byte
- func (t *BoltTracker) GetPosition(processorName string, key string) int
- func (t *BoltTracker) UpdatePosition(processName string, key string, value int) error
- func (t *BoltTracker) UseMemoryTracker() bool
- type JsonTracker
- type MemoryTrackerKeyValue
- type NullTracker
- type TrackerDetails
- type TrackerInterface
- type TrackerKeyValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltTracker ¶
type BoltTracker struct {
// contains filtered or unexported fields
}
BoltTracker tracks/stores where each processor is up to (event wise). Using bboltDB for this... Have a bbolt bucket per processor.
func NewBoltTracker ¶
func NewBoltTracker(path string, syncIntervalInMS int) *BoltTracker
if syncIntervalInMS == 0 it means write realtime and use boltDB as normal.
func (*BoltTracker) Close ¶
func (t *BoltTracker) Close() error
func (*BoltTracker) Connect ¶
func (t *BoltTracker) Connect() error
func (*BoltTracker) CreateBucket ¶
func (t *BoltTracker) CreateBucket(bucketName string) error
func (*BoltTracker) Enabled ¶
func (t *BoltTracker) Enabled() bool
func (*BoltTracker) GetKeyValueListForBucket ¶
func (t *BoltTracker) GetKeyValueListForBucket(bucketNames []string) []TrackerKeyValue
func (*BoltTracker) GetKeysForBucket ¶
func (t *BoltTracker) GetKeysForBucket(bucketName string) [][]byte
func (*BoltTracker) GetPosition ¶
func (t *BoltTracker) GetPosition(processorName string, key string) int
GetInt gets from memory cache or the real bboltdb
func (*BoltTracker) UpdatePosition ¶
func (t *BoltTracker) UpdatePosition(processName string, key string, value int) error
UpdatePosition updates a key in a given bucket.. assumption key is string and value is int. Does the byte array conversion dance. If t.useMemoryTracker is true, then write to the BoltTracker Map.. this will get synced later. if t.useMemoryTracker is false, just write to boltdb directly.
func (*BoltTracker) UseMemoryTracker ¶
func (t *BoltTracker) UseMemoryTracker() bool
type JsonTracker ¶
type JsonTracker struct {
// contains filtered or unexported fields
}
JsonTracker just reads/writes the data directly to a local file. Seeing if this is any quicker than bboltdb
func NewJsonTracker ¶
func NewJsonTracker(path string) *JsonTracker
func (*JsonTracker) GetPosition ¶
func (t *JsonTracker) GetPosition(processorName string, key string) int
GetPostition get data from json file
func (*JsonTracker) UpdatePosition ¶
func (t *JsonTracker) UpdatePosition(processName string, key string, value int) error
func (*JsonTracker) UseMemoryTracker ¶
func (t *JsonTracker) UseMemoryTracker() bool
probably need to modify interface to get rid of this.
type MemoryTrackerKeyValue ¶
type NullTracker ¶
type NullTracker struct { }
NullTracker... for when we dont actually want to track. Saves putting a bunch of logic elsewhere... yes, slightly less efficient but can deal with it.
func NewNullTracker ¶
func NewNullTracker(path string, syncIntervalInMS int) *NullTracker
func (*NullTracker) Enabled ¶
func (t *NullTracker) Enabled() bool
func (*NullTracker) GetPosition ¶
func (t *NullTracker) GetPosition(processorName string, key string) int
func (*NullTracker) UpdatePosition ¶
func (t *NullTracker) UpdatePosition(processName string, key string, value int) error
func (*NullTracker) UseMemoryTracker ¶
func (t *NullTracker) UseMemoryTracker() bool