smadapter

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCallChannelExecutor

func NewCallChannelExecutor(ctx context.Context, bufMax int, requestCancel bool, parallelReaders int) (smachine.AdapterExecutor, chan smachine.AdapterCall)

func NewComponent

func NewComponent(ctx context.Context, cfg Config, runArg interface{}, initFn func(managed.Holder)) (smachine.AdapterExecutor, managed.Component)

func NewComponentExt

func NewComponentExt(ctx context.Context, runArg interface{}, initFn func(managed.Holder), cfg ...Config) ([]smachine.AdapterExecutor, managed.Component)

func NewExecutor

func NewExecutor(ctx context.Context, cfg Config, runArg interface{}) (exec smachine.AdapterExecutor, startFn func())

func StartExecutorFor

func StartExecutorFor(ctx context.Context, cfg Config, runArg interface{}) smachine.AdapterExecutor

Types

type Config

type Config struct {
	MaxBufferCapacity       int
	ExpectedParallelReaders int
	ProvideCancel           bool
}

type OverflowBufferCallChannel

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

This wrapper doesn't allocate a buffer unless the channel is full

func WrapCallChannel

func WrapCallChannel(ctx context.Context, bufMax int, requestCancel bool, output chan smachine.AdapterCall) *OverflowBufferCallChannel

func WrapCallChannelNoLimit

func WrapCallChannelNoLimit(ctx context.Context, requestCancel bool, output chan smachine.AdapterCall) *OverflowBufferCallChannel

func (*OverflowBufferCallChannel) Channel

func (p *OverflowBufferCallChannel) Channel() chan channelRecord

func (*OverflowBufferCallChannel) Context

func (*OverflowBufferCallChannel) SendNotify

func (*OverflowBufferCallChannel) StartCall

func (*OverflowBufferCallChannel) TrySyncCall

type OverflowPanicCallChannel

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

func WrapCallChannelNoBuffer

func WrapCallChannelNoBuffer(requestCancel bool, output chan smachine.AdapterCall) OverflowPanicCallChannel

func (OverflowPanicCallChannel) Channel

func (v OverflowPanicCallChannel) Channel() chan channelRecord

func (OverflowPanicCallChannel) SendNotify

func (OverflowPanicCallChannel) StartCall

func (OverflowPanicCallChannel) TrySyncCall

Jump to

Keyboard shortcuts

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