Documentation ¶
Index ¶
- Constants
- func New() plugins.Plugable
- type IGetTrigger
- type IRegistrar
- type ITrigger
- type StateChangeTrigger
- func (t *StateChangeTrigger) AsyncAttach(wg *sync.WaitGroup)
- func (t *StateChangeTrigger) CallManual()
- func (b *StateChangeTrigger) FunctionName() string
- func (b *StateChangeTrigger) Name() string
- func (t *StateChangeTrigger) Subscribe(options Subscriber) error
- func (t *StateChangeTrigger) Unsubscribe(options Subscriber) error
- type Subscriber
- type SystemTrigger
- type TimeTrigger
Constants ¶
View Source
const ( // StateChangeName ... StateChangeName = "state_change" // StateChangeFunctionName ... StateChangeFunctionName = "automationTriggerStateChanged" // StateChangeQueueSize ... StateChangeQueueSize = 10 )
View Source
const ( // TopicSystem ... TopicSystem = "system" // EventStart ... EventStart = "START" // EventStop ... EventStop = "STOP" // SystemName ... SystemName = "system" // SystemFunctionName ... SystemFunctionName = "automationTriggerSystem" // SystemQueueSize ... SystemQueueSize = 10 )
View Source
const ( // TimeName ... TimeName = "time" // TimeFunctionName ... TimeFunctionName = "automationTriggerTime" // TimeQueueSize ... TimeQueueSize = 10 )
View Source
const ( // Name ... Name = "triggers" // TopicSystemStart ... TopicSystemStart = "system_start" // TopicSystemStop ... TopicSystemStop = "system_stop" Version = "0.0.1" )
View Source
const (
// CronOptionTrigger ...
CronOptionTrigger = "cron"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IGetTrigger ¶
IGetTrigger ...
type IRegistrar ¶
type IRegistrar interface { RegisterTrigger(ITrigger) error UnregisterTrigger(string) error TriggerList() []string }
IRegistrar ...
type ITrigger ¶
type ITrigger interface { Name() string AsyncAttach(wg *sync.WaitGroup) Subscribe(Subscriber) error Unsubscribe(Subscriber) error FunctionName() string CallManual() }
todo deAttach
func NewStateChangedTrigger ¶
NewStateChangedTrigger ...
type StateChangeTrigger ¶
type StateChangeTrigger struct {
// contains filtered or unexported fields
}
StateChangeTrigger ...
func (*StateChangeTrigger) AsyncAttach ¶
func (t *StateChangeTrigger) AsyncAttach(wg *sync.WaitGroup)
AsyncAttach ...
func (*StateChangeTrigger) CallManual ¶ added in v0.5.3
func (t *StateChangeTrigger) CallManual()
CallManual ...
func (*StateChangeTrigger) FunctionName ¶
func (b *StateChangeTrigger) FunctionName() string
FunctionName ...
func (*StateChangeTrigger) Subscribe ¶
func (t *StateChangeTrigger) Subscribe(options Subscriber) error
Subscribe ...
func (*StateChangeTrigger) Unsubscribe ¶
func (t *StateChangeTrigger) Unsubscribe(options Subscriber) error
Unsubscribe ...
type Subscriber ¶
type Subscriber struct { EntityId *common.EntityId Handler interface{} Payload m.Attributes }
Subscriber ...
type SystemTrigger ¶
type SystemTrigger struct {
// contains filtered or unexported fields
}
SystemTrigger ...
func (*SystemTrigger) AsyncAttach ¶
func (t *SystemTrigger) AsyncAttach(wg *sync.WaitGroup)
AsyncAttach ...
func (*SystemTrigger) CallManual ¶ added in v0.5.3
func (t *SystemTrigger) CallManual()
CallManual ...
func (*SystemTrigger) Subscribe ¶
func (t *SystemTrigger) Subscribe(options Subscriber) error
Subscribe ...
func (*SystemTrigger) Unsubscribe ¶
func (t *SystemTrigger) Unsubscribe(options Subscriber) error
Unsubscribe ...
type TimeTrigger ¶
TimeTrigger ...
func (*TimeTrigger) AsyncAttach ¶
func (t *TimeTrigger) AsyncAttach(wg *sync.WaitGroup)
AsyncAttach ...
func (*TimeTrigger) Subscribe ¶
func (t *TimeTrigger) Subscribe(options Subscriber) error
Subscribe ...
func (*TimeTrigger) Unsubscribe ¶
func (t *TimeTrigger) Unsubscribe(options Subscriber) error
Unsubscribe ...
Click to show internal directories.
Click to hide internal directories.