protocol

package
v0.0.0-...-fe06dec Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientNameFromConnectionStatusContent

func GetClientNameFromConnectionStatusContent(payload map[string]interface{}) (string, bool)

func GetClientVersionFromConnectionStatusContent

func GetClientVersionFromConnectionStatusContent(payload map[string]interface{}) (string, bool)

Types

type CanonicalFacts

type CanonicalFacts struct {
	InsightsID            string   `json:"insights_id,omitempty"`
	MachineID             string   `json:"machine_id,omitempty"`
	SubscriptionManagerID string   `json:"subscription_manager_id,omitempty"`
	SatelliteID           string   `json:"satellite_id,omitempty"`
	Fqdn                  string   `json:"fqdn,omitempty"`
	BiosID                string   `json:"bios_uuid,omitempty"`
	IpAddresses           []string `json:"ip_addresses,omitempty"`
	MacAddresses          []string `json:"mac_addresses,omitempty"`
}

type CatalogServiceFacts

type CatalogServiceFacts struct {
	SourcesType     string `json:"sources_type"`
	ApplicationType string `json:"application_type"`
}

type CommandMessageContent

type CommandMessageContent struct {
	Command   string      `json:"command"`
	Arguments interface{} `json:"arguments"`
	Message   string      `json:"message"`
}

type ConnectionStatusMessageContent

type ConnectionStatusMessageContent struct {
	CanonicalFacts  CanonicalFacts `json:"canonical_facts,omitempty"`
	Dispatchers     Dispatchers    `json:"dispatchers"`
	ConnectionState string         `json:"state"`
	Tags            Tags           `json:"tags"`
	ClientName      string         `json:"client_name"`
	ClientVersion   string         `json:"client_version"`
}

type ControlMessage

type ControlMessage struct {
	MessageType string      `json:"type"`
	MessageID   string      `json:"message_id"`
	Version     int         `json:"version"`
	Sent        time.Time   `json:"sent"`
	Content     interface{} `json:"content"`
}

func BuildControlMessage

func BuildControlMessage(messageType string, content *CommandMessageContent) (*uuid.UUID, *ControlMessage, error)

func BuildReconnectMessage

func BuildReconnectMessage(delay int) (*uuid.UUID, *ControlMessage, error)

type DataMessage

type DataMessage struct {
	MessageType string      `json:"type"`
	MessageID   string      `json:"message_id"`
	ResponseTo  string      `json:"response_to"`
	Version     int         `json:"version"`
	Sent        time.Time   `json:"sent"`
	Directive   string      `json:"directive"`
	Metadata    interface{} `json:"metadata"`
	Content     interface{} `json:"content"`
}

func BuildDataMessage

func BuildDataMessage(directive string, metadata interface{}, payload interface{}) (*uuid.UUID, *DataMessage, error)

type Dispatchers

type Dispatchers map[string]map[string]string

type EventMessage

type EventMessage struct {
	MessageType string    `json:"type"`
	MessageID   string    `json:"message_id"`
	ResponseTo  string    `json:"response_to"`
	Version     int       `json:"version"`
	Sent        time.Time `json:"sent"`
	Content     string    `json:"content"`
}

type EventMessageContent

type EventMessageContent string // FIXME:  interface{} ??

type Tags

type Tags map[string]string

Jump to

Keyboard shortcuts

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