action

package
v0.0.0-...-bf0d46e Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action[E storage.Entry] struct {
	// contains filtered or unexported fields
}

func NewAction

func NewAction[E storage.Entry](mode Moder[E]) *Action[E]

func (*Action[E]) Done

func (a *Action[E]) Done()

func (*Action[E]) Finish

func (a *Action[E]) Finish() error

func (*Action[E]) Output

func (a *Action[E]) Output() []string

func (*Action[E]) Prepare

func (a *Action[E]) Prepare() error

func (*Action[E]) Receive

func (a *Action[E]) Receive(items []E)

func (*Action[E]) Run

func (a *Action[E]) Run() error

func (*Action[E]) State

func (a *Action[E]) State() []string

func (*Action[E]) Summary

func (a *Action[E]) Summary() string

type Actor

type Actor[E storage.Entry] interface {
	Prepare() error // preparation before processing data
	Receive([]E)    // receive data asynchronously
	Run() error     // Process data
	Done()          // triggered after upstream data processing
	Finish() error  // data processing completed
	Summary() string
	State() []string
	Output() []string
}

type Moder

type Moder[E storage.Entry] interface {
	Concurrency() int
	Tasker() task.Tasker[E]

	// Run
	// amount: input amount
	// effected: output effected amount
	Run([]E) (int, int) // Process data
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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