worker

package
v9.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExpirationResult

type ExpirationResult struct {
	DeletedMembers int
	DeletedSet     bool
	Set            string
}

ExpirationResult is the struct that represents the result of an expiration job

func (*ExpirationResult) String

func (r *ExpirationResult) String() string

type ExpirationWorker

type ExpirationWorker struct {
	RedisClient             *extredis.Client
	Config                  *viper.Viper
	ConfigPath              string
	ExpirationCheckInterval time.Duration
	ExpirationLimitPerRun   int
	// contains filtered or unexported fields
}

ExpirationWorker is the struct that represents the scores expirer worker

func GetExpirationWorker

func GetExpirationWorker(configPath string) (*ExpirationWorker, error)

GetExpirationWorker returns a new scores expirer worker

func NewExpirationWorker

func NewExpirationWorker(host string, port int, password string, db int, connectionTimeout int,
	expirationCheckInterval time.Duration, expirationLimitPerRun int) (*ExpirationWorker, error)

NewExpirationWorker returns a new scores expirer worker with already loaded configuration.

func (*ExpirationWorker) Run

func (w *ExpirationWorker) Run(resultsChan chan<- []*ExpirationResult, errChan chan<- error)

Run starts the worker -- this method blocks

func (*ExpirationWorker) Stop

func (w *ExpirationWorker) Stop()

Stop stops

Jump to

Keyboard shortcuts

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