dmiserver

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 27 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Limit = 1000
	Burst = 100
)
View Source
const (
	SockPath = "/etc/kubeedge/dmi.sock"
)

Variables

This section is empty.

Functions

func CreateMessageStateUpdate added in v1.18.0

func CreateMessageStateUpdate(in *pb.ReportDeviceStatesRequest) ([]byte, error)

CreateMessageStateUpdate create state update message.

func CreateMessageTwinUpdate

func CreateMessageTwinUpdate(twin *pb.Twin) ([]byte, error)

CreateMessageTwinUpdate create twin update message.

func StartDMIServer

func StartDMIServer(cache *DMICache)

Types

type DMICache

type DMICache struct {
	MapperMu        *sync.Mutex
	DeviceMu        *sync.Mutex
	DeviceModelMu   *sync.Mutex
	MapperList      map[string]*pb.MapperInfo
	DeviceModelList map[string]*v1beta1.DeviceModel
	DeviceList      map[string]*v1beta1.Device
}

type DeviceStateUpdate added in v1.18.0

type DeviceStateUpdate struct {
	types.BaseMessage
	State string
}

DeviceStateUpdate the structure of device state update.

type DeviceTwinUpdate

type DeviceTwinUpdate struct {
	types.BaseMessage
	Twin map[string]*types.MsgTwin `json:"twin"`
}

DeviceTwinUpdate the structure of device twin update.

Jump to

Keyboard shortcuts

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