robfigcron

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Proto = "robfigcron"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body interface {
	io.Reader
	Scan(obj interface{}) error
}

type Request

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

Request 处理任务请求

func (*Request) Body

func (m *Request) Body() []byte

func (*Request) CanProc

func (m *Request) CanProc() bool

func (*Request) Context

func (m *Request) Context() sctx.Context

func (*Request) GetHeader

func (m *Request) GetHeader() map[string]string

func (*Request) GetMethod

func (m *Request) GetMethod() string

GetMethod 方法名

func (*Request) GetName

func (m *Request) GetName() string

GetName 服务名

func (*Request) GetRemoteAddr

func (m *Request) GetRemoteAddr() string

func (*Request) GetService

func (m *Request) GetService() string

GetService 服务名

func (*Request) GetURL added in v0.5.1

func (m *Request) GetURL() *url.URL

GetURL 服务URL

func (*Request) Monopoly

func (m *Request) Monopoly(monopolyJobs cmap.ConcurrentMap) (bool, error)

func (*Request) Params

func (m *Request) Params() map[string]string

func (*Request) WithContext

func (m *Request) WithContext(ctx sctx.Context)

type Response

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

Request 处理任务请求

func (*Response) Flush

func (r *Response) Flush() error

func (*Response) Header

func (r *Response) Header() xtypes.SMap

func (*Response) Size

func (r *Response) Size() int

func (*Response) Status

func (r *Response) Status() int

func (*Response) Write

func (r *Response) Write(data []byte) (n int, err error)

func (*Response) WriteHeader

func (r *Response) WriteHeader(code int)

func (*Response) WriteString

func (r *Response) WriteString(s string) (n int, err error)

Writes the string into the response body.

func (*Response) Written

func (r *Response) Written() bool

Returns true if the response body was already written.

type Server

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

func (*Server) AddJob

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

func (*Server) GetAddr

func (e *Server) GetAddr() string

func (*Server) GetProto

func (e *Server) GetProto() string

func (*Server) RemoveJob

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

func (*Server) Serve

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

func (*Server) Stop

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

Jump to

Keyboard shortcuts

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