README ¶ go-interval Go Job Interval With Distributed Lock Redis as distributed lock Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type GoInterval func (t *GoInterval) Run(ctx context.Context) error type Locker func (s *Locker) Lock(ctx context.Context, key string) (success bool, err error) func (s *Locker) Unlock(ctx context.Context, key string) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type GoInterval ¶ type GoInterval struct { Name string Arg func() Interval time.Duration RedisConnector *redis.Client // contains filtered or unexported fields } func (*GoInterval) Run ¶ func (t *GoInterval) Run(ctx context.Context) error type Locker ¶ type Locker struct { // contains filtered or unexported fields } func (*Locker) Lock ¶ func (s *Locker) Lock(ctx context.Context, key string) (success bool, err error) func (*Locker) Unlock ¶ func (s *Locker) Unlock(ctx context.Context, key string) error Source Files ¶ View all Source files goInterval.go goIntervalLock.go Directories ¶ Show internal Expand all Path Synopsis cmd Click to show internal directories. Click to hide internal directories.