client

package
v0.0.0-...-4ba8117 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

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 Abs

func Abs(x int64) int64

func InitPubSub

func InitPubSub(ctx *actor.RootContext) error

Init init pubsub instance

func NewDoorsActor

func NewDoorsActor() actor.Actor

func NewGPSActor

func NewGPSActor() actor.Actor

func Publish

func Publish(topic string, msg []byte)

Publish function to publish messages in pubsub gateway

func SubscribeFun

func SubscribeFun(topic string, pid *actor.PID, parse func([]byte) (interface{}, error)) error

Subscribe subscribe to topics

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 NewEventActor

func NewEventActor() *EventActor

NewEventActor create EventActor

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

func (*GPSActor) Receive

func (a *GPSActor) Receive(ctx actor.Context)

Receive func Receive in actor

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

func (act *Logger) SetLogBuild(info *log.Logger) *Logger

SetLogBuild set logs with INFO level

func (*Logger) SetLogCamera

func (act *Logger) SetLogCamera(info *log.Logger) *Logger

SetLogCamera set logs with INFO level

func (*Logger) SetLogError

func (act *Logger) SetLogError(err *log.Logger) *Logger

SetLogError set logs with ERROR level

func (*Logger) SetLogInfo

func (act *Logger) SetLogInfo(info *log.Logger) *Logger

SetLogInfo set logs with INFO level

func (*Logger) SetLogWarn

func (act *Logger) SetLogWarn(warn *log.Logger) *Logger

SetLogWarn set logs with WARN level

func (*Logger) WithDebug

func (act *Logger) WithDebug() *Logger

WithDebug apply debug

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 MsgDoor

type MsgDoor struct {
	ID    uint
	Value uint
}

type MsgGPS

type MsgGPS struct {
	Data []byte
}

MsgGPS GPRMC Data

type MsgGetGps

type MsgGetGps struct{}

type MsgGpsRaw

type MsgGpsRaw struct {
	Data []byte
	Time time.Time
}

type MsgRequestStatus

type MsgRequestStatus struct {
}

type MsgSendRegisters

type MsgSendRegisters struct{}

type MsgStatus

type MsgStatus struct {
	State bool
}

type MsgSubscribe

type MsgSubscribe struct{}

type MyMap

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

func (*MyMap) Add

func (m *MyMap) Add(key int32, value int64)

func (*MyMap) Delete

func (m *MyMap) Delete(key int32)

func (*MyMap) Get

func (m *MyMap) Get(key int32) int64

func (*MyMap) Iterate

func (m *MyMap) Iterate() map[int32]int64

func (*MyMap) String

func (m *MyMap) String() string

type PingActor

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

PingActor type

func (*PingActor) Receive

func (act *PingActor) Receive(ctx actor.Context)

Receive function to actor Receive messages

Directories

Path Synopsis
comm

Jump to

Keyboard shortcuts

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