common

package
v0.1.121 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AsyncComponent        = "common_async"
	AsyncInPort    string = "in"
	AsyncOutPort   string = "out"
)
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"
	ModifyInPort    string = "in"
	ModifyOutPort   string = "out"
)
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"
	SignalOutPort   string = "out"
)
View Source
const (
	TickerComponent         = "ticker"
	TickerOutPort    string = "out"
	TickerStatusPort string = "status"
)
View Source
const (
	MixerOutputPort string = "output"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Async

type Async struct {
}

func (*Async) GetInfo

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

func (*Async) Handle

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

func (*Async) Instance

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

func (*Async) Ports

func (t *Async) Ports() []module.Port

type AsyncContext

type AsyncContext any

type AsyncInMessage

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

type AsyncOutMessage

type AsyncOutMessage struct {
	Context AsyncContext `json:"context"`
}

type Condition

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

type Debug

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

func (*Debug) GetInfo

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

func (*Debug) Handle

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

func (*Debug) Instance

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

func (*Debug) Ports

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

type DebugContext

type DebugContext any

type DebugControl

type DebugControl struct {
	Context DebugContext `json:"context" readonly:"true" required:"true" title:"Context"`
}

type DebugIn

type DebugIn struct {
	Context DebugContext `json:"context" configurable:"false" required:"true" title:"Context" title:"Context"`
}

type DebugSettings

type DebugSettings struct {
	Context DebugContext `json:"context" configurable:"true" required:"true" title:"Context" description:"Debug message"`
}

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.Port

type DelayContext

type DelayContext any

type DelayInMessage

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

type DelayOutMessage

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

type Mixer

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

func (*Mixer) GetInfo

func (m *Mixer) GetInfo() module.ComponentInfo

func (*Mixer) Handle

func (m *Mixer) Handle(ctx context.Context, output module.Handler, port string, msg interface{}) error

func (*Mixer) Instance

func (m *Mixer) Instance() module.Component

func (*Mixer) Ports

func (m *Mixer) Ports() []module.Port

type MixerInput

type MixerInput struct {
	Context MixerInputContext `json:"context" configurable:"true" required:"true" title:"Context" description:"Arbitrary message"`
	// contains filtered or unexported fields
}

func (MixerInput) Process

func (m MixerInput) Process(s *jsonschema.Schema)

Process post-processing schema

type MixerInputContext

type MixerInputContext any

type MixerOutput

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

func (MixerOutput) Process

func (m MixerOutput) Process(s *jsonschema.Schema)

type MixerSettings

type MixerSettings struct {
	Inputs []string `json:"inputs,omitempty" required:"true" title:"Inputs" minItems:"1" uniqueItems:"true"`
}

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.Port

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.Port

Ports drop settings, make it port payload

type RouterContext

type RouterContext any

type RouterInMessage

type RouterInMessage struct {
	Context    RouterContext `json:"context" configurable:"true" required:"true" title:"Context" description:"Arbitrary message to be routed"`
	Conditions []Condition   `json:"conditions,omitempty" required:"true" title:"Conditions" minItems:"1" uniqueItems:"true"`
}

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"`
	EnableDefaultPort bool     `json:"enableDefaultPort" required:"true" title:"Enable default port"`
}

type Scheduler

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

func (*Scheduler) GetInfo

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

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.Port

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"`
	Task    Task             `json:"task" title:"Task" required:"true"`
}

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 Signal

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

func (*Signal) GetInfo

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

func (*Signal) Handle

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

func (*Signal) Instance

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

func (*Signal) Ports

func (t *Signal) Ports() []module.Port

type SignalContext

type SignalContext any

type SignalControl

type SignalControl struct {
	Context SignalContext `json:"context" required:"true" title:"Context"`
	Send    bool          `json:"send" format:"button" title:"Send" required:"true"`
}

type SignalSettings

type SignalSettings struct {
	Context SignalContext `json:"context" required:"true" configurable:"true" title:"Context" description:"Arbitrary message to send"`
	Auto    bool          `json:"auto" title:"Auto send" required:"true" description:"Send signal automatically"`
}

type Task

type Task struct {
	ID       string    `json:"id" required:"true" title:"Unique task ID"`
	DateTime time.Time `json:"dateTime" required:"true" title:"Date and time" description:"Format examples: 2012-10-01T09:45:00.000+02:00"`
	Schedule bool      `` /* 144-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.Port

type TickerContext

type TickerContext any

type TickerControl

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

type TickerSettings

type TickerSettings struct {
	Context          TickerContext `json:"context" configurable:"true" title:"Context" description:"Arbitrary message to be send each period of time"`
	Period           int           `json:"period" required:"true" title:"Periodicity (ms)" minimum:"10" default:"1000"`
	EnableStatusPort bool          `json:"enableStatusPort" required:"true" title:"Enable status port" description:"Status port"`
}

type TickerStatus

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

Jump to

Keyboard shortcuts

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