Documentation ¶
Index ¶
- Constants
- type Option
- type Server
- func (e *Server) AddJob(jobs ...*xcron.Job) (keys []string, err error)
- func (e *Server) Attempt() bool
- func (e *Server) Config(cfg config.Config)
- func (e *Server) Endpoint() *url.URL
- func (e *Server) Group(group string, middlewares ...middleware.Middleware) *engine.RouterGroup
- func (e *Server) Handle(path string, obj interface{})
- func (e *Server) Name() string
- func (e *Server) Options(opts ...Option)
- func (e *Server) RemoveJob(key ...string)
- func (s *Server) ServiceName() string
- func (e *Server) Start(ctx context.Context) (err error)
- func (e *Server) Stop(ctx context.Context) (err error)
- func (e *Server) Type() string
- func (e *Server) Use(middlewares ...middleware.Middleware)
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 WithServiceName ¶ added in v0.1.8
WithServiceName 设置服务名称
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Group ¶
func (e *Server) Group(group string, middlewares ...middleware.Middleware) *engine.RouterGroup
func (*Server) Use ¶
func (e *Server) Use(middlewares ...middleware.Middleware)
Click to show internal directories.
Click to hide internal directories.