Documentation ¶
Index ¶
- func AddCronJob(spec string, cmd func())
- func Cache() cache.Cache
- func Config() *config.Config
- func DB() *gorm.DB
- func InQueue(name string, data interface{}) error
- func InQueueWithRetry(name string, data interface{}, tries int) error
- func Logger() *logrus.Logger
- func NewApp(opts ...app.Option) *app.App
- func NewJob(name string, data interface{}, tries int) (*queue.Job, error)
- func Queue() queue.Queuer
- func Redis() *redis.Client
- func RedisCluster() *redis.ClusterClient
- func Registry() registry.Registry
- func WithAddr(addr string) app.Option
- func WithCfgAddr(cfgAddr string) app.Option
- func WithCfgPath(cfgPath string) app.Option
- func WithCron(cron *cron.Cron) app.Option
- func WithCronEnable() app.Option
- func WithHideBanner() app.Option
- func WithName(name string) app.Option
- func WithRunMode(mode string) app.Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCronJob ¶ added in v1.1.0
func AddCronJob(spec string, cmd func())
AddCronJob use add cron job
func InQueueWithRetry ¶
InQueueWithRetry use for job enqueue
func RedisCluster ¶
func RedisCluster() *redis.ClusterClient
RedisCluster return redis.ClusterClient
func WithCfgAddr ¶
WithCfgAddr use for set app's config center addr
func WithCfgPath ¶
WithCfgPath use for set app's config center path
func WithCronEnable ¶ added in v1.1.0
WithCronEnable use for enable cron. default is disable
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.