server

package
v0.0.0-...-caf5360 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const TimeOut = 60

Variables

This section is empty.

Functions

func StartCron

func StartCron(cron *Cron)

func StartSync

func StartSync(syncWorker *SyncWorker)

func StopCron

func StopCron(cron *Cron)

Types

type CeleryClient

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

func InitClient

func InitClient(addr string) *CeleryClient

init client Pool

func InitSTLClient

func InitSTLClient(addr string, certFile string) *CeleryClient

init STL client Pool

func (*CeleryClient) Close

func (cli *CeleryClient) Close()

func (*CeleryClient) Do

func (cli *CeleryClient) Do(req *task.Request) task.Response

type CliPool

type CliPool struct {
	sync.Mutex

	Maxconn int    //连接数
	Address string //

	MaxIdleConn int //最大连接数
	MinOpenConn int //最小存活数
	LocalConn   int //当前连接数
	// contains filtered or unexported fields
}

type Cron

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

func NewCron

func NewCron() *Cron

func (*Cron) RegisterWroker

func (this *Cron) RegisterWroker(spec string, cmd func()) (cron.EntryID, error)

type Cursor

type Cursor interface {
	Do(req *task.Request) task.Response
	// contains filtered or unexported methods
}

type SyncWorker

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

func InitSyncWroker

func InitSyncWroker() *SyncWorker

异步持续运行的服务对象

func (*SyncWorker) Init

func (this *SyncWorker) Init(fs ...func())

func (*SyncWorker) RegisterWrokers

func (this *SyncWorker) RegisterWrokers(fs ...func())

Jump to

Keyboard shortcuts

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