redisdb

package
v0.0.0-...-8291241 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNil = redis.Nil

Functions

func DelayedForceRefreshAutojoin

func DelayedForceRefreshAutojoin(codeID string, in time.Duration) error

Same as ForceRefreshAutojoin, but with a delay in case of an error not to overwhelm a TVS

func ForceRefreshAutojoin

func ForceRefreshAutojoin(codeID string) error

Can be used for example after a code update to force new request to start a new updated toaster

func GetOrForceExeIDExecution

func GetOrForceExeIDExecution(exeid, tvsip string, timeoutSec int) (string, bool, error)

func Init

func Init() (err error)

func JoinOrCreateExecution

func JoinOrCreateExecution(codeID, exeid, tvsip string, maxConcurrentJoiners, joinableForSec, timeoutSec int) (string, string, error)

func LockTryOnce

func LockTryOnce(key string, lockExpiration time.Duration) (bool, error)

func Unlock

func Unlock(key string) error

Types

type Client

type Client interface {
	redis.Scripter
	redis.Cmdable
}

func GetClient

func GetClient() Client

Jump to

Keyboard shortcuts

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