exclusive

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Duration = time.Second * 10

Variables

This section is empty.

Functions

This section is empty.

Types

type Service added in v0.26.0

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(redisClient redis.Client) Service

func (Service) Enabled added in v0.26.0

func (s Service) Enabled() bool

func (Service) Execute added in v0.26.0

func (s Service) Execute(ctx context.Context, name string, duration time.Duration, action func(context.Context) error) error

func (Service) Try added in v0.26.0

func (s Service) Try(ctx context.Context, name string, duration time.Duration, action func(context.Context) error) (bool, error)

Jump to

Keyboard shortcuts

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