program

package
v0.0.0-...-cb7d7c7 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LastEventIdsFileName = "last_event_ids.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Program

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

Program 程序实体

func New

func New(cfg *config.Config) (*Program, error)

New 创建程序实例

func (*Program) GetLastEventIds

func (p *Program) GetLastEventIds(key string) ([]byte, bool)

GetLastEventIds 读取上次结束位置lastEventId

func (*Program) GetLastEventIdsToJsonBytes

func (p *Program) GetLastEventIdsToJsonBytes() ([]byte, error)

GetLastEventIdsToJsonBytes 获取json字符

func (*Program) Run

func (p *Program) Run()

Run 启动程序

func (*Program) SetLastEventIds

func (p *Program) SetLastEventIds(key string, val []byte)

SetLastEventIds 设置最后监听事件id

func (*Program) Stop

func (p *Program) Stop()

Stop 程序结束要做的事

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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