Documentation ¶
Index ¶
- func AddPlugin(adaptors *adaptors.Adaptors, name string, opts ...m.AttributeValue) (err error)
- func AddScript(name, src string, adaptors *adaptors.Adaptors, ...) (script *m.Script, err error)
- func AddTask(newTask *m.NewTask, adaptors *adaptors.Adaptors, eventBus bus.Bus) (task1Id int64, err error)
- func AddTrigger(trigger *m.NewTrigger, adaptors *adaptors.Adaptors, eventBus bus.Bus) (id int64, err error)
- func GetNewBitmineL3(name string) *m.Entity
- func GetNewButton(id string, scripts []*m.Script) *m.Entity
- func GetNewModbusRtu(name string) *m.Entity
- func GetNewModbusTcp(name string) *m.Entity
- func GetNewMoon(name string) *m.Entity
- func GetNewNode(name string) *m.Entity
- func GetNewPlug(id string, scrits []*m.Script) *m.Entity
- func GetNewScene(id string, scripts []*m.Script) *m.Entity
- func GetNewSensor(name string) *m.Entity
- func GetNewSun(name string) *m.Entity
- func GetNewTelegram(name string) *m.Entity
- func GetNewWeatherMet(name string) *m.Entity
- func GetPort() int64
- func MockHttpServer(ctx context.Context, ip string, port int64, payload []byte) (err error)
- func MockTCPServer(ctx context.Context, ip string, port int64, payloads ...[]byte) (err error)
- func RegisterConvey(scriptService scripts.ScriptService, ctx convey.C)
- func Wait(timeOut time.Duration, ch chan interface{}) (ok bool)
- func WaitEntity(eventBus bus.Bus, timeOut time.Duration, entities ...string) (result chan bool)
- func WaitGroupTimeout(wg *sync.WaitGroup, timeOut time.Duration) bool
- func WaitMessage[...](eventBus bus.Bus, timeOut time.Duration, topic string, options ...interface{}) (msg T, ok bool)
- func WaitPlugins(eventBus bus.Bus, timeOut time.Duration, plugins ...string) (result chan bool)
- func WaitService(eventBus bus.Bus, timeOut time.Duration, services ...string) (result chan bool)
- func WaitT[...](timeOut time.Duration, ch chan T) (v T, ok bool)
- func WaitTask(eventBus bus.Bus, timeOut time.Duration, tasks ...int64) (result chan bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddScript ¶ added in v0.5.2
func AddScript(name, src string, adaptors *adaptors.Adaptors, scriptService scripts.ScriptService) (script *m.Script, err error)
AddScript ...
func AddTrigger ¶ added in v0.12.0
func GetNewWeatherMet ¶ added in v0.9.0
GetNewWeatherMet ...
func MockHttpServer ¶
MockHttpServer ...
func MockTCPServer ¶
MockTCPServer ...
func RegisterConvey ¶
func RegisterConvey(scriptService scripts.ScriptService, ctx convey.C)
RegisterConvey ...
func WaitEntity ¶ added in v0.16.1
func WaitGroupTimeout ¶ added in v0.15.0
func WaitMessage ¶ added in v0.16.1
func WaitMessage[T events.EventStateChanged | events.EventTriggerCompleted | events.EventTriggerLoaded]( eventBus bus.Bus, timeOut time.Duration, topic string, options ...interface{}, ) (msg T, ok bool)
func WaitPlugins ¶ added in v0.16.1
func WaitService ¶ added in v0.16.1
func WaitT ¶ added in v0.15.0
func WaitT[T events.EventTriggerLoaded | events.EventTriggerCompleted | events.EventStateChanged | alexa.EventAlexaAction | []byte | struct{}](timeOut time.Duration, ch chan T) (v T, ok bool)
WaitT ...
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.