runner

package
v0.1.54 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 25 Imported by: 0

README

Component Wrapper

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateWithConfigurableDefinitions

func UpdateWithConfigurableDefinitions(original []byte, updateWith []byte, configurableDefinitions map[string]*ajson.Node) ([]byte, error)

Types

type Handler added in v0.1.53

type Handler func(ctx context.Context, msg *Msg) 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"`
}

Msg being sent via instances edges

type Runner

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

func NewRunner

func NewRunner(name string, component m.Component) *Runner

func (*Runner) Cancel added in v0.1.53

func (c *Runner) Cancel()

Cancel cancels all entity requests

func (*Runner) Configure

func (c *Runner) Configure(ctx context.Context, node v1alpha1.TinyNode) error

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

func (*Runner) GetStats

func (c *Runner) GetStats() map[string]interface{}

GetStats @todo deprecate

func (*Runner) Input added in v0.1.53

func (c *Runner) Input(ctx context.Context, msg *Msg, outputHandler Handler) error

Input processes input to the inherited component

func (*Runner) Node added in v0.1.53

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

func (*Runner) SetLogger

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

func (*Runner) SetMeter added in v0.1.53

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

func (*Runner) SetTracer added in v0.1.53

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

func (*Runner) UpdateStatus added in v0.1.43

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

UpdateStatus apply status changes

Jump to

Keyboard shortcuts

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