client

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenUniqueID

func GenUniqueID() string

Generate Unique ID Currently using ULID, this maybe conflict with other process with very low possibility

Types

type Client

type Client struct {
	Ttr int64

	LoopTime time.Duration

	Stop chan struct{}
	// contains filtered or unexported fields
}

func NewClient

func NewClient(topics string) *Client

func (*Client) FinishTask

func (c *Client) FinishTask(id string) error

完成任务

func (*Client) GetTask

func (c *Client) GetTask()

查询任务

func (*Client) PopHandle

func (c *Client) PopHandle(popHandle func(string, string) error)

func (*Client) PopTaskTicker

func (c *Client) PopTaskTicker()

轮训执行数据

func (*Client) PushTask

func (c *Client) PushTask(delay int64, body string) error

添加任务

Jump to

Keyboard shortcuts

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