part

package
v0.28.20240109141201 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 4 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStopRun = errors.New("ErrStopRun")
	ErrSelfDel = errors.New("ErrSelfDel")
)

Functions

This section is empty.

Types

type Component

type Component[T any] struct {
	// contains filtered or unexported fields
}

func NewComp

func NewComp[T any](deal func(ctx context.Context, ptr T) error) *Component[T]

func (*Component[T]) Del

func (t *Component[T]) Del()

func (*Component[T]) Run

func (t *Component[T]) Run(ctx context.Context, ptr T) error

type Components

type Components[T any] struct {
	// contains filtered or unexported fields
}

func NewComps

func NewComps[T any](c ...*Component[T]) *Components[T]

func (*Components[T]) Del

func (t *Components[T]) Del(c ...*Component[T])

func (*Components[T]) DelAll

func (t *Components[T]) DelAll()

func (*Components[T]) Put

func (t *Components[T]) Put(c ...*Component[T])

func (*Components[T]) Run

func (t *Components[T]) Run(ctx context.Context, ptr T) error

func (*Components[T]) Start

func (t *Components[T]) Start(ctx context.Context, ptr T, concurrency ...int) error

Jump to

Keyboard shortcuts

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