cron

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const Type string = "cron"

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*options)

Option 参数设置类型

func Log added in v0.1.15

func Log(opts ...log.ServerOption) Option

Log 设置日志配置

func WithConfig

func WithConfig(config config.Config) Option

WithConfig 设置Config

func WithServiceName added in v0.1.8

func WithServiceName(serviceName string) Option

WithServiceName 设置服务名称

type Server

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

func New

func New(name string, opts ...Option) *Server

New 实例化

func (*Server) AddJob added in v0.1.39

func (e *Server) AddJob(jobs ...*xcron.Job) (keys []string, err error)

func (*Server) Attempt

func (e *Server) Attempt() bool

Attempt 判断是否可以启动

func (*Server) Config

func (e *Server) Config(cfg config.Config)

func (*Server) Endpoint added in v0.1.8

func (e *Server) Endpoint() *url.URL

func (*Server) Group

func (e *Server) Group(group string, middlewares ...middleware.Middleware) *engine.RouterGroup

func (*Server) Handle

func (e *Server) Handle(path string, obj interface{})

func (*Server) Name

func (e *Server) Name() string

func (*Server) Options

func (e *Server) Options(opts ...Option)

Options 设置参数

func (*Server) RemoveJob added in v0.1.39

func (e *Server) RemoveJob(key ...string)

func (*Server) ServiceName added in v0.1.8

func (s *Server) ServiceName() string

ServiceName 服务名称

func (*Server) Start

func (e *Server) Start(ctx context.Context) (err error)

Start 开始

func (*Server) Stop

func (e *Server) Stop(ctx context.Context) (err error)

Shutdown 停止

func (*Server) Type

func (e *Server) Type() string

func (*Server) Use

func (e *Server) Use(middlewares ...middleware.Middleware)

Jump to

Keyboard shortcuts

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