com

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TopicOrchestration = "orchestration"

	TopicOrgPrivateKey = "orgKey"
	TopicNodeDelete    = "delete"
)

Variables

This section is empty.

Functions

func ConnectNode

func ConnectNode(subscriptions map[string]mqtt.MessageHandler) error

func CreateMQTTLogger added in v1.1.4

func CreateMQTTLogger(out io.Writer, formatter log.Formatter, level log.Level)

func DisconnectNode

func DisconnectNode() error

func RegisterNode

func RegisterNode() error

func SendEdgeAppLogs added in v1.1.0

func SendEdgeAppLogs(msg EdgeAppLogMsg) error

func SendHeartbeat

func SendHeartbeat(msg StatusMsg) error

func SendNodePublicKey added in v1.1.0

func SendNodePublicKey(nodePublicKey []byte) error

Types

type ContainerLogLineMsg added in v1.3.0

type ContainerLogLineMsg struct {
	Level    string    `json:"level"`
	Time     time.Time `json:"time"`
	Filename string    `json:"filename"`
	Message  string    `json:"message"`
}

type ContainerLogMsg added in v1.3.0

type ContainerLogMsg struct {
	ContainerID string                `json:"containerID"`
	Log         []ContainerLogLineMsg `json:"log"`
}

type ContainerMsg added in v1.1.0

type ContainerMsg struct {
	Name   string `json:"name"`
	Status string `json:"status"`
}

type DeviceParamsMsg added in v1.1.0

type DeviceParamsMsg struct {
	SystemUpTime uint64  `json:"systemUpTime"`
	SystemLoad   float64 `json:"systemLoad"`
	StorageFree  float64 `json:"storageFree"`
	RamFree      float64 `json:"ramFree"`
}

type EdgeAppLogMsg added in v1.1.0

type EdgeAppLogMsg struct {
	ManifestID    string            `json:"manifestID"`
	ContainerLogs []ContainerLogMsg `json:"containerLog"`
}

type EdgeAppMsg added in v1.1.0

type EdgeAppMsg struct {
	ManifestID string         `json:"manifestID"`
	Status     string         `json:"status"`
	Containers []ContainerMsg `json:"containers"`
}

type StatusMsg added in v1.1.0

type StatusMsg struct {
	Status           string          `json:"status"`
	EdgeApplications []EdgeAppMsg    `json:"edgeApplications"`
	DeviceParams     DeviceParamsMsg `json:"deviceParams"`
	AgentVersion     string          `json:"agentVersion"`
}

Jump to

Keyboard shortcuts

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