steper

package
v0.0.0-...-120cf50 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STEP_DONE   uint32 = 999999  //step完成
	ROUND_DONE  uint32 = 1000000 //round完成
	ROUND_START uint32 = 1000001 //round开始
)
View Source
const (
	UNKNOWN_STATUS = 0 //未知状态
)
View Source
const (
	UNLIMIT int = 0 //无限制
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Round

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

func NewRound

func NewRound() *Round

func (*Round) DelStep

func (r *Round) DelStep(step *Step)

func (*Round) Destroy

func (r *Round) Destroy()

func (*Round) GetCurrStatus

func (r *Round) GetCurrStatus() uint32

func (*Round) GetCurrStep

func (r *Round) GetCurrStep() *Step

func (*Round) InsertStep

func (r *Round) InsertStep(prevStep *Step, step *Step)

func (*Round) PushBack

func (r *Round) PushBack(step *Step)

func (*Round) PushFront

func (r *Round) PushFront(step *Step)

func (*Round) Range

func (r *Round) Range(f func(step *Step))

func (*Round) Reset

func (r *Round) Reset()

func (*Round) Run

func (r *Round) Run()

type Step

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

func NewStep

func NewStep(id uint32, f func(ctx context.Context) uint32) *Step

func (*Step) Destroy

func (s *Step) Destroy()

摧毁

func (*Step) Do

func (s *Step) Do() chan uint32

func (*Step) GetId

func (s *Step) GetId() uint32

func (*Step) StepOver

func (s *Step) StepOver() chan uint32

跳过

func (*Step) Stop

func (s *Step) Stop()

让当前

func (*Step) Suspend

func (s *Step) Suspend()

中断

type StepFunc

type StepFunc func(ctx context.Context) uint32

Jump to

Keyboard shortcuts

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