goschedule

package
v0.0.0-...-d72dd33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2024 License: MIT Imports: 6 Imported by: 0

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()

func (*SynchronizedClock) Set

func (clock *SynchronizedClock) Set(timestamp time.Time) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL