Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrLockInstanceNotFound utils.Error = "cron lock instance not found" ErrUnsupportedSchedulerType utils.Error = "unsupported cron scheduler type" )
Variables ¶
This section is empty.
Functions ¶
func AppName ¶
func AppName(name string) utils.OptionFunc[useOption]
Types ¶
type Conf ¶
type Conf struct { Type schedulerType `yaml:"type" json:"type" toml:"type" default:"asynq"` Instance string `yaml:"instance" json:"instance" toml:"instance"` InstanceType instanceType `yaml:"instance_type" json:"instance_type" toml:"instance_type"` LockInstance string `yaml:"lock_instance" json:"lock_instance" toml:"lock_instance"` Queue string `yaml:"queue" json:"queue" toml:"queue"` Server bool `yaml:"server" json:"server" toml:"server" default:"true"` Trigger bool `yaml:"trigger" json:"trigger" toml:"trigger" default:"false"` ServerConcurrency int `yaml:"server_concurrency" json:"server_concurrency" toml:"server_concurrency"` Timezone string `yaml:"timezone" json:"timezone" toml:"timezone" default:"Asia/Shanghai"` Tasks map[string]*taskConf `yaml:"tasks" json:"tasks" toml:"tasks"` TaskLoader string `yaml:"task_loader" json:"task_loader" toml:"task_loader"` RefreshTasksInterval string `yaml:"refresh_tasks_interval" json:"refresh_tasks_interval" toml:"refresh_tasks_interval" default:"3m"` EnableLogger bool `yaml:"enable_logger" json:"enable_logger" toml:"enable_logger" default:"false"` LogLevel string `yaml:"log_level" json:"log_level" toml:"log_level" default:"info"` Logger string `yaml:"logger" json:"logger" toml:"logger" default:"github.com/wfusion/gofusion/log/customlogger.cronLogger"` LogInstance string `yaml:"log_instance" json:"log_instance" toml:"log_instance" default:"default"` }
Conf conf nolint: revive // struct tag too long issue
Click to show internal directories.
Click to hide internal directories.