Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetSynchronizationManager ¶
func SetSynchronizationManager(syncMgr SynchronizationManager)
Types ¶
type ScheduledJob ¶
type ScheduledJob struct {
// contains filtered or unexported fields
}
func ScheduleSynchronizedJob ¶
func ScheduleSynchronizedJob(id string, rule string, cb func()) (ScheduledJob, error)
func (ScheduledJob) Stop ¶
func (job ScheduledJob) Stop()
type SynchronizationManager ¶
type SynchronizationManager interface { Set(key string, value int64) Get(key string) (value int64, ok bool) Delete(key string) Exists(key string) bool SetGreaterThan(key string, value int64) bool }
func NewSynchronizationManagerMemory ¶
func NewSynchronizationManagerMemory() SynchronizationManager
func NewSynchronizationManagerRedis ¶
func NewSynchronizationManagerRedis(store *redis.Redis, namespace string) SynchronizationManager
type SynchronizedClock ¶
type SynchronizedClock struct {
// contains filtered or unexported fields
}
func NewSynchronizedClock ¶
func NewSynchronizedClock(id string, syncMgr SynchronizationManager) *SynchronizedClock
func (*SynchronizedClock) Reset ¶
func (clock *SynchronizedClock) Reset()
Click to show internal directories.
Click to hide internal directories.