config

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// require: true
	Broker brokers.BrokerInterface

	// require: false
	Backend backends.BackendInterface

	// require: false
	Logger log.LoggerInterface

	// require: false
	// default:false
	Debug bool

	// require: false
	// default: 1 day
	// task status expires in ex seconds, -1:forever
	StatusExpires int

	// require: false
	// default: 1 day
	// task result expires in ex seconds, -1:forever
	ResultExpires int

	EnableDelayServer    bool
	DelayServerQueueSize int
}

func NewConfig

func NewConfig(setConfigFunc ...SetConfigFunc) Config

func (Config) Clone

func (c Config) Clone() Config

type Opt

type Opt struct {
}

type SetConfigFunc

type SetConfigFunc func(*Config)

func Debug

func Debug(debug bool) SetConfigFunc

func DelayServerQueueSize

func DelayServerQueueSize(size int) SetConfigFunc

func EnableDelayServer

func EnableDelayServer(enable bool) SetConfigFunc

func Logger

func ResultExpires

func ResultExpires(ex int) SetConfigFunc

func StatusExpires

func StatusExpires(ex int) SetConfigFunc

Jump to

Keyboard shortcuts

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