go_interval

package module
v0.0.0-...-c1b3fb1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2021 License: MIT Imports: 5 Imported by: 0

README

go-interval

Go Job Interval With Distributed Lock

Redis as distributed lock

Documentation

Index

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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