Documentation ¶
Index ¶
- type DTContext
- func (dtc *DTContext) BuildModelMessage(group string, parentID string, resource string, operation string, ...) *model.Message
- func (dtc *DTContext) CommTo(dtmName string, content interface{}) error
- func (dtc *DTContext) GetDevice(deviceID string) (*dttype.Device, bool)
- func (dtc *DTContext) GetMutex(deviceID string) (*sync.Mutex, bool)
- func (dtc *DTContext) HeartBeat(dtmName string, content interface{}) error
- func (dtc *DTContext) IsDeviceExist(deviceID string) bool
- func (dtc *DTContext) Lock(deviceID string) bool
- func (dtc *DTContext) LockAll()
- func (dtc *DTContext) Send(identity string, action string, module string, msg *model.Message) error
- func (dtc *DTContext) Unlock(deviceID string) bool
- func (dtc *DTContext) UnlockAll()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DTContext ¶
type DTContext struct { GroupID string NodeName string CommChan map[string]chan interface{} ConfirmChan chan interface{} ConfirmMap *sync.Map ModulesHealth *sync.Map ModulesContext *context.Context DeviceList *sync.Map DeviceMutex *sync.Map Mutex *sync.RWMutex // DBConn *dtclient.Conn State string }
DTContext context for devicetwin
func (*DTContext) BuildModelMessage ¶
func (dtc *DTContext) BuildModelMessage(group string, parentID string, resource string, operation string, content interface{}) *model.Message
BuildModelMessage build mode messages
func (*DTContext) IsDeviceExist ¶
IsDeviceExist judge device is exist
Click to show internal directories.
Click to hide internal directories.