service

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

各种状态简写

Variables

View Source
var (
	ErrTaskDuplicate       = errors.New("重复任务")
	ErrTaskFlowInvalid     = errors.New("流程失效")
	ErrTaskResourceInvalid = errors.New("资源失效")
	ErrInvalidMsg          = errors.New("无效消息")
	ErrHandlerMiss         = errors.New("handler NotFound")
)

ERROR

View Source
var (
	ErrMangaNoIndex = errors.New("漫画无图")
)

ERROR

Functions

This section is empty.

Types

type Cache

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

Cache .

type RscHandler

type RscHandler interface {
	CheckMessage(json.RawMessage) (interface{}, error)
	HandleMessage(context.Context, interface{}) error
}

RscHandler .

type Service

type Service struct {

	// cache
	Cache
	// contains filtered or unexported fields
}

Service struct

func New

func New(c *conf.Config) (s *Service)

New init

func (*Service) Close

func (s *Service) Close()

Close Service

func (*Service) DebugCache

func (s *Service) DebugCache(keys string) map[string]interface{}

DebugCache .

func (*Service) KickOut

func (s *Service) KickOut(c context.Context, bizid, flowid, uid int64)

KickOut 踢出过期用户并释放任务

func (*Service) Ping

func (s *Service) Ping(c context.Context) (err error)

Ping Service

type TaskHandler

type TaskHandler interface {
	CheckMessage(*databus.Message) (interface{}, error)
	HandleMessage(context.Context, interface{}) error
}

TaskHandler .

type WeightManager

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

WeightManager weight manager

func NewWeightManager

func NewWeightManager(s *Service, opt *model.WeightOPT, key string) (wm *WeightManager)

NewWeightManager new

Jump to

Keyboard shortcuts

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