Documentation ¶
Index ¶
- Constants
- type Body
- type Config
- type Counter
- type Job
- type Option
- type Request
- func (m *Request) Body() []byte
- func (m *Request) CanProc() bool
- func (m *Request) Context() sctx.Context
- func (m *Request) GetHeader() map[string]string
- func (m *Request) GetMethod() string
- func (m *Request) GetName() string
- func (m *Request) GetRemoteAddr() string
- func (m *Request) GetService() string
- func (m *Request) NextTime(t time.Time) time.Time
- func (m *Request) Params() map[string]string
- func (m *Request) WithContext(ctx sctx.Context) alloter.IRequest
- type Response
- func (r *Response) Flush() error
- func (r *Response) Header() xtypes.SMap
- func (r *Response) Size() int
- func (r *Response) Status() int
- func (r *Response) Write(data []byte) (n int, err error)
- func (r *Response) WriteHeader(code int)
- func (r *Response) WriteString(s string) (n int, err error)
- func (r *Response) Written() bool
- type Round
- type Server
- 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) *server.RouterGroup
- func (e *Server) Handle(path string, obj interface{})
- func (e *Server) Name() string
- func (e *Server) Options(opts ...Option)
- func (s *Server) ServiceName() string
- func (e *Server) Start(ctx context.Context) error
- func (e *Server) Stop(ctx context.Context) error
- func (e *Server) Type() string
- func (e *Server) Use(middlewares ...middleware.Middleware)
- type Setting
Constants ¶
View Source
const Type string = "cron"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Job ¶
type Job struct { Cron string `json:"cron"` Service string `json:"service"` Disable bool `json:"disable"` Immediately bool `json:"immediately"` Meta metadata.Metadata `json:"meta,omitempty"` }
func (*Job) GetService ¶
func (*Job) IsImmediately ¶
type Option ¶
type Option func(*options)
Option 参数设置类型
func WithServiceName ¶ added in v0.1.8
WithServiceName 设置服务名称
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request 处理任务请求
func (*Request) GetRemoteAddr ¶
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
Request 处理任务请求
func (*Response) WriteHeader ¶
func (*Response) WriteString ¶
Writes the string into the response body.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Group ¶
func (e *Server) Group(group string, middlewares ...middleware.Middleware) *server.RouterGroup
func (*Server) Use ¶
func (e *Server) Use(middlewares ...middleware.Middleware)
Click to show internal directories.
Click to hide internal directories.