Documentation ¶
Index ¶
- Constants
- func Abs(x int64) int64
- func InitPubSub(ctx *actor.RootContext) error
- func NewDoorsActor() actor.Actor
- func NewGPSActor() actor.Actor
- func Publish(topic string, msg []byte)
- func SubscribeFun(topic string, pid *actor.PID, parse func([]byte) (interface{}, error)) error
- type CountingActor
- type DoorsActor
- type EventActor
- type GPSActor
- type ListenActor
- type Logger
- func (act *Logger) SetLogBuild(info *log.Logger) *Logger
- func (act *Logger) SetLogCamera(info *log.Logger) *Logger
- func (act *Logger) SetLogError(err *log.Logger) *Logger
- func (act *Logger) SetLogInfo(info *log.Logger) *Logger
- func (act *Logger) SetLogWarn(warn *log.Logger) *Logger
- func (act *Logger) WithDebug() *Logger
- type MapInterface
- type MsgDoor
- type MsgGPS
- type MsgGetGps
- type MsgGpsRaw
- type MsgRequestStatus
- type MsgSendRegisters
- type MsgStatus
- type MsgSubscribe
- type MyMap
- type PingActor
Constants ¶
View Source
const ( TopicAppliance = "appliance/camera" TopicStart = TopicAppliance + "/START" TopicRestart = TopicAppliance + "/RESTART" TopicStop = TopicAppliance + "/STOP" TopicStatus = TopicAppliance + "/STATUS" TopicRequestInfoState = TopicAppliance + "/RequestInfoState" )
Variables ¶
This section is empty.
Functions ¶
func NewDoorsActor ¶
func NewGPSActor ¶
Types ¶
type CountingActor ¶
type CountingActor struct { persistence.Mixin *Logger // contains filtered or unexported fields }
CountingActor struct
func NewCountingActor ¶
func NewCountingActor() *CountingActor
NewCountingActor create CountingActor
func (*CountingActor) Receive ¶
func (a *CountingActor) Receive(ctx actor.Context)
Receive function to receive message in actor
func (*CountingActor) SetCountCloseDoor ¶
func (a *CountingActor) SetCountCloseDoor(id int, state bool)
SetZeroOpenState set the open state in gpio door
func (*CountingActor) SetZeroOpenState ¶
func (a *CountingActor) SetZeroOpenState(id int, state bool)
SetZeroOpenState set the open state in gpio door
type DoorsActor ¶
type DoorsActor struct {
// contains filtered or unexported fields
}
Actor actor to listen events
func (*DoorsActor) Receive ¶
func (a *DoorsActor) Receive(ctx actor.Context)
Receive func Receive in actor
type EventActor ¶
type EventActor struct { *Logger // contains filtered or unexported fields }
EventActor type
func (*EventActor) Receive ¶
func (act *EventActor) Receive(ctx actor.Context)
Receive function to Receive actor messages
type GPSActor ¶
type GPSActor struct {
// contains filtered or unexported fields
}
Actor actor to listen events
type ListenActor ¶
type ListenActor struct { *Logger // contains filtered or unexported fields }
ListenActor actor to listen events
func NewListen ¶
func NewListen(socket string, countingActor *actor.PID) *ListenActor
NewListen create listen actor
func (*ListenActor) Receive ¶
func (act *ListenActor) Receive(ctx actor.Context)
Receive func Receive in actor
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger struct to logger
func (*Logger) SetLogBuild ¶
SetLogBuild set logs with INFO level
func (*Logger) SetLogCamera ¶
SetLogCamera set logs with INFO level
func (*Logger) SetLogError ¶
SetLogError set logs with ERROR level
func (*Logger) SetLogInfo ¶
SetLogInfo set logs with INFO level
func (*Logger) SetLogWarn ¶
SetLogWarn set logs with WARN level
type MapInterface ¶
type MapInterface interface { Add(key int32, value int64) Get(key int32) int64 Delete(key int32) Iterate() map[int32]int64 }
func NewMyMap ¶
func NewMyMap() MapInterface
type MsgRequestStatus ¶
type MsgRequestStatus struct { }
type MsgSendRegisters ¶
type MsgSendRegisters struct{}
type MsgSubscribe ¶
type MsgSubscribe struct{}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.