Documentation ¶
Index ¶
- Constants
- type Body
- type Config
- type Option
- type Request
- func (m *Request) Body() []byte
- 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) 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 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(queue 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
- type Task
Constants ¶
View Source
const Type string = "mqc"
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 Request ¶
type Request struct { queue.IMQCMessage // contains filtered or unexported fields }
Request 处理任务请求
func NewRequest ¶
func NewRequest(task *Task, m queue.IMQCMessage) (r *Request, err error)
NewRequest 构建任务请求
func (*Request) GetRemoteAddr ¶
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
Request 处理任务请求
func NewResponse ¶
func NewResponse(task *Task, msg queue.IMQCMessage) (r *Response, err error)
NewRequest 构建任务请求
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.