runner

package
v0.1.150 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 30 Imported by: 0

README

Component Wrapper

Documentation

Index

Constants

View Source
const FromSignal = "signal"

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler added in v0.1.53

type Handler func(ctx context.Context, msg *Msg) (any, error)

type Msg

type Msg struct {

	// which edge lead this message, optional
	EdgeID string `json:"edgeID"`
	// which node:port sent message, optional
	From string `json:"from"`
	// recipient of this message in a format node:port
	To   string `json:"to"`
	Data []byte `json:"data"`

	Nonce string `json:"nonce,omitempty"`

	//
	Resp interface{} `json:"-"`
}

Msg being sent via instances edges

type Runner

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

func NewRunner

func NewRunner(component m.Component) *Runner

func (*Runner) DataHandler added in v0.1.147

func (c *Runner) DataHandler(outputHandler Handler) func(outputCtx context.Context, outputPort string, outputData any) any

func (*Runner) GetComponent added in v0.1.147

func (c *Runner) GetComponent() m.Component

func (*Runner) HasPort added in v0.1.74

func (c *Runner) HasPort(port string) bool

func (*Runner) MsgHandler added in v0.1.147

func (c *Runner) MsgHandler(ctx context.Context, msg *Msg, msgHandler Handler) (res any, err error)

MsgHandler processes msg to the embedded component applies port config for the given port if any

func (*Runner) Node added in v0.1.53

func (c *Runner) Node() v1alpha1.TinyNode

func (*Runner) ReadStatus added in v0.1.118

func (c *Runner) ReadStatus(status *v1alpha1.TinyNodeStatus) error

ReadStatus reads status

func (*Runner) SetLogger

func (c *Runner) SetLogger(l logr.Logger) *Runner

func (*Runner) SetManager added in v0.1.25

func (c *Runner) SetManager(m resource.ManagerInterface) *Runner

func (*Runner) SetMeter added in v0.1.53

func (c *Runner) SetMeter(m metric.Meter) *Runner

func (*Runner) SetNode added in v0.1.63

func (c *Runner) SetNode(node v1alpha1.TinyNode) *Runner

SetNode updates specs and decides do we need to restart which handles by Run method

func (*Runner) SetTracer added in v0.1.53

func (c *Runner) SetTracer(t trace.Tracer) *Runner

func (*Runner) SetTracker added in v0.1.65

func (c *Runner) SetTracker(t tracker.Manager) *Runner

func (*Runner) Stop added in v0.1.148

func (c *Runner) Stop()

Stop cancels all ongoing requests

Jump to

Keyboard shortcuts

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