producer

package
v0.0.0-...-eb30a85 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenericTask

type GenericTask interface {
	Function() string
	Args() []string
}

type Option

type Option func(*Producer)

func WithRunningTimeout

func WithRunningTimeout(timeout time.Duration) Option

func WithTasksBuffer

func WithTasksBuffer(buffer int) Option

type Producer

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

func NewProducer

func NewProducer(identity string, connectAddress string, actorOpts []actor.Option, opts ...Option) (*Producer, error)

func (*Producer) Close

func (s *Producer) Close()

func (*Producer) Connect

func (s *Producer) Connect() error

func (*Producer) Process

func (s *Producer) Process(ctx context.Context, genericTask GenericTask, timeout time.Duration) ([]string, error)

func (*Producer) Run

func (s *Producer) Run(ctx context.Context, errors chan<- error, logs chan<- string)

type RunningState

type RunningState struct{}

type SendAnnounceState

type SendAnnounceState struct{}

type StartState

type StartState struct{}

type Task

type Task struct {
	ID       string
	Function string
	Args     []string
}

type TaskChannels

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

type WaitAnnounceAckState

type WaitAnnounceAckState struct{}

Jump to

Keyboard shortcuts

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