Skip to content

Commit

Permalink
baetyl-758 add edge node labels (#234)
Browse files Browse the repository at this point in the history
* baetyl-758 add edge node labels

* baetyl-758 add edge node labels
  • Loading branch information
zxxf18 authored Feb 18, 2021
1 parent 8ee712c commit d4bfca9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion dmcontext/observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const (
)

type observer struct {
log *log.Logger
log *log.Logger
msgChs map[string]chan *v1.Message
}

Expand Down
7 changes: 7 additions & 0 deletions spec/v1/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ const (
MessageDeviceDesire MessageKind = "deviceDesire"
// MessageDesire device delta message kind
MessageDeviceDelta MessageKind = "deviceDelta"

// MessageCommandConnect start remote debug command
MessageCommandConnect = "connect"
// MessageCommandDisconnect stop remote debug command
MessageCommandDisconnect = "disconnect"
// MessageCommandNodeLabel label the edge cluster nodes
MessageCommandNodeLabel = "nodeLabel"
)

// Message general structure for http and ws sync
Expand Down
27 changes: 14 additions & 13 deletions spec/v1/sync_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@ const (

// NodeInfo node info
type NodeInfo struct {
Hostname string `yaml:"hostname,omitempty" json:"hostname,omitempty"`
Address string `yaml:"address,omitempty" json:"address,omitempty"`
Arch string `yaml:"arch,omitempty" json:"arch,omitempty"`
KernelVersion string `yaml:"kernelVer,omitempty" json:"kernelVer,omitempty"`
OS string `yaml:"os,omitempty" json:"os,omitempty"`
ContainerRuntime string `yaml:"containerRuntime,omitempty" json:"containerRuntime"`
MachineID string `yaml:"machineID,omitempty" json:"machineID"`
BootID string `yaml:"bootID,omitempty" json:"bootID"`
SystemUUID string `yaml:"systemUUID,omitempty" json:"systemUUID"`
OSImage string `yaml:"osImage,omitempty" json:"osImage"`
Variant string `yaml:"variant,omitempty" json:"variant,omitempty"`
HostID string `yaml:"hostID,omitempty" json:"hostID,omitempty"`
Role string `yaml:"role,omitempty" json:"role,omitempty"`
Hostname string `yaml:"hostname,omitempty" json:"hostname,omitempty"`
Address string `yaml:"address,omitempty" json:"address,omitempty"`
Arch string `yaml:"arch,omitempty" json:"arch,omitempty"`
KernelVersion string `yaml:"kernelVer,omitempty" json:"kernelVer,omitempty"`
OS string `yaml:"os,omitempty" json:"os,omitempty"`
ContainerRuntime string `yaml:"containerRuntime,omitempty" json:"containerRuntime"`
MachineID string `yaml:"machineID,omitempty" json:"machineID"`
BootID string `yaml:"bootID,omitempty" json:"bootID"`
SystemUUID string `yaml:"systemUUID,omitempty" json:"systemUUID"`
OSImage string `yaml:"osImage,omitempty" json:"osImage"`
Variant string `yaml:"variant,omitempty" json:"variant,omitempty"`
HostID string `yaml:"hostID,omitempty" json:"hostID,omitempty"`
Role string `yaml:"role,omitempty" json:"role,omitempty"`
Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty" validate:"omitempty,validLabels"`
}

// NodeStats node statistics
Expand Down

0 comments on commit d4bfca9

Please sign in to comment.