common

package
v0.1.72 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugComponent        = "debug"
	DebugInPort    string = "in"
)
View Source
const (
	DelayComponent        = "delay"
	DelayOutPort   string = "out"
	DelayInPort    string = "in"
)
View Source
const (
	ModifyComponent        = "common_modify"
	ModifyOutPort   string = "out"
	ModifyInPort    string = "in"
)
View Source
const (
	RouterComponent   = "router"
	RouterInPort      = "input"
	RouterDefaultPort = "default"
)
View Source
const (
	SchedulerComponent        = "scheduler"
	SchedulerOutPort   string = "out"
	SchedulerInPort    string = "in"
	SchedulerAckPort   string = "ack"
)
View Source
const (
	SignalComponent        = "signal"
	StartOutPort    string = "out"
)
View Source
const (
	TickerComponent         = "ticker"
	TickerOutPort    string = "out"
	TickerStatusPort string = "status"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition struct {
	RouteName RouteName `json:"route" title:"Route" required:"true" propertyOrder:"1"`
	Condition bool      `json:"condition,omitempty" required:"true" title:"Condition" propertyOrder:"2"`
}

type Debug

type Debug struct {
}

func (*Debug) GetInfo

func (t *Debug) GetInfo() module.ComponentInfo

func (*Debug) Handle

func (t *Debug) Handle(ctx context.Context, output module.Handler, port string, message interface{}) error

func (*Debug) Instance

func (t *Debug) Instance() module.Component

func (*Debug) Ports

func (t *Debug) Ports() []module.NodePort

type DebugContext

type DebugContext any

type Delay

type Delay struct {
}

func (*Delay) GetInfo

func (t *Delay) GetInfo() module.ComponentInfo

func (*Delay) Handle

func (t *Delay) Handle(ctx context.Context, handler module.Handler, port string, msg interface{}) error

func (*Delay) Instance

func (t *Delay) Instance() module.Component

func (*Delay) Ports

func (t *Delay) Ports() []module.NodePort

type DelayContext

type DelayContext any

type DelayInMessage

type DelayInMessage struct {
	Context DelayContext `json:"context" configurable:"true" title:"Context" description:"Arbitrary message to be delayed" propertyOrder:"1"`
	Delay   int          `json:"delay" required:"true" title:"Delay (ms)" propertyOrder:"2"`
}

type DelayOutMessage

type DelayOutMessage struct {
	Delay   int          `json:"delay"`
	Context DelayContext `json:"context"`
}

type Modify

type Modify struct {
}

func (*Modify) GetInfo

func (t *Modify) GetInfo() module.ComponentInfo

func (*Modify) Handle

func (t *Modify) Handle(ctx context.Context, handler module.Handler, port string, msg interface{}) error

func (*Modify) Instance

func (t *Modify) Instance() module.Component

func (*Modify) Ports

func (t *Modify) Ports() []module.NodePort

type ModifyContext

type ModifyContext any

type ModifyInMessage

type ModifyInMessage struct {
	Context ModifyContext `json:"context" configurable:"true" required:"true" title:"Context" description:"Arbitrary message to be modified"`
}

type ModifyOutMessage

type ModifyOutMessage struct {
	Context ModifyContext `json:"context"`
}

type RouteName

type RouteName struct {
	Value   string
	Options []string
}

RouteName special type which can carry its value and possible options for enum values

func (RouteName) JSONSchema

func (r RouteName) JSONSchema() (jsonschema.Schema, error)

func (*RouteName) MarshalJSON

func (r *RouteName) MarshalJSON() ([]byte, error)

MarshalJSON treat like underlying Value string

func (*RouteName) UnmarshalJSON

func (r *RouteName) UnmarshalJSON(data []byte) error

UnmarshalJSON treat like underlying Value string

type Router

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

func (*Router) GetInfo

func (t *Router) GetInfo() module.ComponentInfo

func (*Router) Handle

func (t *Router) Handle(ctx context.Context, handler module.Handler, port string, msg interface{}) error

func (*Router) Instance

func (t *Router) Instance() module.Component

func (*Router) Ports

func (t *Router) Ports() []module.NodePort

Ports drop settings, make it port payload

type RouterContext

type RouterContext any

type RouterInMessage

type RouterInMessage struct {
	Context    RouterContext `` /* 129-byte string literal not displayed */
	Conditions []Condition   `json:"conditions,omitempty" required:"true" title:"Conditions" minItems:"1" uniqueItems:"true" propertyOrder:"2"`
}

type RouterOutMessage

type RouterOutMessage struct {
	Route   string        `json:"route" required:"true" title:"Selected route" default:"A"`
	Context RouterContext `json:"context"`
}

type RouterSettings

type RouterSettings struct {
	Routes []string `json:"routes,omitempty" required:"true" title:"Routes" minItems:"1" uniqueItems:"true"`
}

type Scheduler

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

func (*Scheduler) GetInfo

func (s *Scheduler) GetInfo() module.ComponentInfo

func (*Scheduler) GetState added in v0.1.5

func (s *Scheduler) GetState() ([]byte, error)

func (*Scheduler) Handle

func (s *Scheduler) Handle(ctx context.Context, handler module.Handler, port string, msg interface{}) error

func (*Scheduler) Instance

func (s *Scheduler) Instance() module.Component

func (*Scheduler) Ports

func (s *Scheduler) Ports() []module.NodePort

func (*Scheduler) SetState added in v0.1.5

func (s *Scheduler) SetState(state []byte) error

type SchedulerContext

type SchedulerContext any

type SchedulerInMessage

type SchedulerInMessage struct {
	Context SchedulerContext `json:"context" title:"Context" configurable:"true" description:"Arbitrary message to be send further" propertyOrder:"1"`
	Task    Task             `json:"task" title:"Task" required:"true" propertyOrder:"2"`
}

type SchedulerOutMessage

type SchedulerOutMessage struct {
	Task    Task             `json:"task"`
	Context SchedulerContext `json:"context"`
}

type SchedulerSettings

type SchedulerSettings struct {
	EnableAckPort bool `` /* 134-byte string literal not displayed */
}

type SchedulerTaskAck

type SchedulerTaskAck struct {
	Task        Task             `json:"task"`
	Context     SchedulerContext `json:"context"`
	ScheduledIn int64            `json:"scheduledIn"`
}

type Start added in v0.1.5

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

func (*Start) GetInfo added in v0.1.5

func (t *Start) GetInfo() module.ComponentInfo

func (*Start) Handle added in v0.1.5

func (t *Start) Handle(ctx context.Context, handle module.Handler, port string, msg interface{}) error

func (*Start) Instance added in v0.1.5

func (t *Start) Instance() module.Component

func (*Start) Ports added in v0.1.5

func (t *Start) Ports() []module.NodePort

type StartContext added in v0.1.5

type StartContext any

type StartControl added in v0.1.38

type StartControl struct {
	Send    bool         `json:"send" format:"button" title:"Send" required:"true" propertyOrder:"1"`
	Context StartContext `json:"context" propertyOrder:"2" title:"Context"`
}

type StartSettings added in v0.1.5

type StartSettings struct {
	Context StartContext `json:"context" configurable:"true" title:"Context" description:"Arbitrary message to send" propertyOrder:"1"`
	Auto    bool         `json:"auto" title:"Auto send" description:"Send signal automatically" propertyOrder:"2"`
}

type Task

type Task struct {
	ID       string    `json:"id" required:"true" title:"Unique task ID" propertyOrder:"1"`
	DateTime time.Time `` /* 132-byte string literal not displayed */
	Schedule bool      `` /* 157-byte string literal not displayed */
}

type Ticker

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

func (*Ticker) GetInfo

func (t *Ticker) GetInfo() module.ComponentInfo

func (*Ticker) Handle

func (t *Ticker) Handle(ctx context.Context, handler module.Handler, port string, msg interface{}) error

func (*Ticker) Instance

func (t *Ticker) Instance() module.Component

func (*Ticker) Ports

func (t *Ticker) Ports() []module.NodePort

type TickerContext

type TickerContext any

type TickerControl

type TickerControl struct {
	Start bool `json:"start" required:"true" title:"Ticker state"`
}

type TickerSettings

type TickerSettings struct {
	Period            int           `json:"period" required:"true" title:"Periodicity (ms)" minimum:"10" default:"1000" propertyOrder:"1"`
	EnableControlPort bool          `` /* 146-byte string literal not displayed */
	Context           TickerContext `json:"context" configurable:"true" title:"Context" description:"Arbitrary message to be send each period of time"`
}

type TickerStatus

type TickerStatus struct {
	Status string `json:"status" readonly:"true" title:"Status" colSpan:"col-span-6" propertyOrder:"1"`
	Reset  bool   `json:"reset" format:"button" title:"Reset" required:"true" colSpan:"col-span-6" propertyOrder:"2"`
}

Jump to

Keyboard shortcuts

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