time

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const SUNRISE = "sunrise"
View Source
const SUNSET = "sunset"
View Source
const TIME_FORMAT = "2006-01-02 15:04:05"

Variables

This section is empty.

Functions

func NewNode

func NewNode(flowOpCtx *model.FlowOperationalContext, meta model.MetaNode, ctx *model.Context) model.Node

Types

type Node

type Node struct {
	base.BaseNode
	// contains filtered or unexported fields
}

Time trigger node

func (*Node) Cleanup

func (node *Node) Cleanup() error

is invoked when node flow is stopped

func (*Node) ConfigureInStream

func (node *Node) ConfigureInStream(activeSubscriptions *[]string, msgInStream model.MsgPipeline)

func (*Node) Init

func (node *Node) Init() error

is invoked when node is started

func (*Node) LoadNodeConfig

func (node *Node) LoadNodeConfig() error

func (*Node) OnInput

func (node *Node) OnInput(msg *model.Message) ([]model.NodeID, error)

func (*Node) WaitForEvent

func (node *Node) WaitForEvent(nodeEventStream chan model.ReactorEvent)

type NodeConfig

type NodeConfig struct {
	DefaultValue            model.Variable
	Expressions             []TimeExpression
	GenerateAstroTimeEvents bool
	Latitude                float64
	Longitude               float64
	TimeZone                float64
	SunriseTimeOffset       float64 // astro time offset in minutes
	SunsetTimeOffset        float64 // astro time offset in minutes
}

type TimeExpression

type TimeExpression struct {
	Name       string
	Expression string //https://godoc.org/github.com/robfig/cron#Job
	Comment    string
}

Jump to

Keyboard shortcuts

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