batchpipe

package module
v0.0.0-...-7f03e8a Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchDelayNode

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

func NewBatchDelayNode

func NewBatchDelayNode(name string, batchSize int, batchWait time.Duration, calc func(int) time.Duration) *BatchDelayNode

func (*BatchDelayNode) Execute

func (b *BatchDelayNode) Execute()

func (*BatchDelayNode) GetName

func (b *BatchDelayNode) GetName() string

func (*BatchDelayNode) GetOutput

func (b *BatchDelayNode) GetOutput() chan interface{}

func (*BatchDelayNode) PutInput

func (b *BatchDelayNode) PutInput(input interface{}) error

func (*BatchDelayNode) SetDelayFunc

func (b *BatchDelayNode) SetDelayFunc(f func(int) time.Duration) error

func (*BatchDelayNode) SetInput

func (b *BatchDelayNode) SetInput(input chan interface{})

func (*BatchDelayNode) Shutdown

func (b *BatchDelayNode) Shutdown()

Nodes after shutdown is not thread safe

type BatchPipeline

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

func NewBatchPipeline

func NewBatchPipeline() *BatchPipeline

func (*BatchPipeline) AddNode

func (p *BatchPipeline) AddNode(index int, node CompNode) error

func (*BatchPipeline) DeleteNode

func (p *BatchPipeline) DeleteNode(index int) error

func (*BatchPipeline) GetNode

func (p *BatchPipeline) GetNode(index int) CompNode

func (*BatchPipeline) GetNodes

func (p *BatchPipeline) GetNodes() []CompNode

func (*BatchPipeline) GetOutput

func (p *BatchPipeline) GetOutput() chan interface{}

func (*BatchPipeline) InputFrom

func (p *BatchPipeline) InputFrom(index int, value interface{}) error

func (*BatchPipeline) ShutdownPipeline

func (p *BatchPipeline) ShutdownPipeline()

func (*BatchPipeline) StartPipeline

func (p *BatchPipeline) StartPipeline()

type CompNode

type CompNode interface {
	GetName() string
	Execute()
	SetInput(chan interface{})
	PutInput(interface{}) error
	GetOutput() chan interface{}
	Shutdown()
}

type Pipeline

type Pipeline interface {
	StartPipeline()
	ShutdownPipeline()
	InputFrom(int, interface{}) error
	GetOutput() chan interface{}
	GetNodes() []CompNode
	GetNode(int) CompNode
	AddNode(int, CompNode) error
	DeleteNode(int)
}

type Switch

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

func NewSwitch

func NewSwitch() *Switch

func (*Switch) IsOn

func (s *Switch) IsOn() bool

func (*Switch) Off

func (s *Switch) Off()

func (*Switch) On

func (s *Switch) On()

func (*Switch) WaitOn

func (s *Switch) WaitOn() chan struct{}

type TimerTask

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

func NewTimerTask

func NewTimerTask() *TimerTask

func (*TimerTask) CostTime

func (t *TimerTask) CostTime() (time.Duration, error)

func (*TimerTask) Finish

func (t *TimerTask) Finish()

func (*TimerTask) Start

func (t *TimerTask) Start()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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