worker

package
v0.0.0-...-eb6b089 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeStartMosaic = "mosaic:start"
	TypeStopMosaic  = "mosaic:stop"
)
View Source
const (
	LockingTimeTTL    time.Duration = 120 * time.Second
	KeepAliveInterval time.Duration = LockingTimeTTL / 3
	ReleaseTimeout    time.Duration = 5 * time.Second
)

Variables

View Source
var (
	ErrLockFailed = fmt.Errorf("failed to obtain lock")
)

Functions

func GenerateMosaic

func GenerateMosaic(
	ctx context.Context,
	m mosaic.Mosaic,
	cfg *config.Config,
	logger *zap.SugaredLogger,
	locker locking.Locker,
	cmdExecutor mosaic.Command,
	stg storage.Storage,
) error

func Run

func Run(lc fx.Lifecycle, cfg *config.Config, logger *zap.SugaredLogger, locker *locking.RedisLocker, stg storage.Storage)

Types

type MosaicTaskParams

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

type StartMosaicPayload

type StartMosaicPayload struct {
	Mosaic mosaic.Mosaic
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳