cloudprotocol

package
v0.0.0-...-54d5584 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 6 Imported by: 24

Documentation

Index

Constants

View Source
const (
	AlertTagSystemError      = "systemAlert"
	AlertTagAosCore          = "coreAlert"
	AlertTagResourceValidate = "resourceValidateAlert"
	AlertTagDeviceAllocate   = "deviceAllocateAlert"
	AlertTagSystemQuota      = "systemQuotaAlert"
	AlertTagInstanceQuota    = "instanceQuotaAlert"
	AlertTagDownloadProgress = "downloadProgressAlert"
	AlertTagServiceInstance  = "serviceInstanceAlert"
)

Alert tags.

View Source
const (
	DownloadTargetComponent = "component"
	DownloadTargetLayer     = "layer"
	DownloadTargetService   = "service"
)

Download target types.

View Source
const (
	RenewCertsNotificationMessageType       = "renewCertificatesNotification"
	IssuedUnitCertsMessageType              = "issuedUnitCertificates"
	IssueUnitCertsMessageType               = "issueUnitCertificates"
	InstallUnitCertsConfirmationMessageType = "installUnitCertificatesConfirmation"
)

Certificate message types.

View Source
const (
	ForceUpdate     = "force"
	TriggerUpdate   = "trigger"
	TimetableUpdate = "timetable"
)

SOTA/FOTA schedule type.

View Source
const (
	OverrideEnvVarsMessageType       = "overrideEnvVars"
	OverrideEnvVarsStatusMessageType = "overrideEnvVarsStatus"
)

EnvVars message types.

View Source
const (
	RequestLogMessageType = "requestLog"
	PushLogMessageType    = "pushLog"
)

Log message types.

View Source
const (
	SystemLog  = "systemLog"
	ServiceLog = "serviceLog"
	CrashLog   = "crashLog"
)

Log types.

View Source
const (
	LogStatusOk     = "ok"
	LogStatusError  = "error"
	LogStatusEmpty  = "empty"
	LogStatusAbsent = "absent"
)

Log statuses.

View Source
const (
	StartProvisioningRequestMessageType   = "startProvisioningRequest"
	StartProvisioningResponseMessageType  = "startProvisioningResponse"
	FinishProvisioningRequestMessageType  = "finishProvisioningRequest"
	FinishProvisioningResponseMessageType = "finishProvisioningResponse"
	DeprovisioningRequestMessageType      = "deprovisioningRequest"
	DeprovisioningResponseMessageType     = "deprovisioningResponse"
)

Provisioning message types.

View Source
const (
	StateAcceptanceMessageType = "stateAcceptance"
	UpdateStateMessageType     = "updateState"
	NewStateMessageType        = "newState"
	StateRequestMessageType    = "stateRequest"
)

State message types.

View Source
const (
	InstanceStateActivating = "activating"
	InstanceStateActive     = "active"
	InstanceStateInactive   = "inactive"
	InstanceStateFailed     = "failed"
)

Instance statuses.

View Source
const (
	UnknownStatus     = "unknown"
	PendingStatus     = "pending"
	DownloadingStatus = "downloading"
	DownloadedStatus  = "downloaded"
	InstallingStatus  = "installing"
	InstalledStatus   = "installed"
	RemovingStatus    = "removing"
	RemovedStatus     = "removed"
	ErrorStatus       = "error"
)

Service/layers/components statuses.

View Source
const (
	GenericPartition  = "generic"
	StoragesPartition = "storages"
	StatesPartition   = "states"
	ServicesPartition = "services"
	LayersPartition   = "layers"
)

Partition types.

View Source
const (
	NodeStatusUnprovisioned = "unprovisioned"
	NodeStatusProvisioned   = "provisioned"
	NodeStatusPaused        = "paused"
	NodeStatusError         = "error"
)

Node statuses.

View Source
const (
	NodeAttrMainNode      = "MainNode"
	NodeAttrAosComponents = "AosComponents"
	NodeAttrRunners       = "NodeRunners"
)

Node attribute names.

View Source
const (
	AosComponentCM  = "cm"
	AosComponentIAM = "iam"
	AosComponentSM  = "sm"
	AosComponentUM  = "um"
)

Node attribute values.

View Source
const AlertsMessageType = "alerts"

AlertsMessageType alerts message type.

View Source
const DesiredStatusMessageType = "desiredStatus"

DesiredStatusMessageType desired status message type.

View Source
const MonitoringMessageType = "monitoringData"

MonitoringMessageType monitoring message type.

View Source
const ProtocolVersion = 6

ProtocolVersion specifies supported protocol version.

View Source
const ServiceDiscoveryType = "serviceDiscovery"

ServiceDiscoveryType service discovery message type.

View Source
const UnitSecretVersion = "2.0.0"

UnitSecretVersion specifies supported version of UnitSecret message.

View Source
const UnitStatusMessageType = "unitStatus"

UnitStatusMessageType unit status message type.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertItem

type AlertItem struct {
	Timestamp time.Time `json:"timestamp"`
	Tag       string    `json:"tag"`
}

AlertItem common alert data.

type Alerts

type Alerts struct {
	MessageType string        `json:"messageType"`
	Items       []interface{} `json:"items"`
}

Alerts alerts message structure.

type CPUInfo

type CPUInfo struct {
	ModelName  string `json:"modelName"`
	NumCores   uint64 `json:"totalNumCores"`
	NumThreads uint64 `json:"totalNumThreads"`
	Arch       string `json:"arch"`
	ArchFamily string `json:"archFamily"`
	MaxDMIPs   uint64 `json:"maxDmips"`
}

CPUInfo cpu information.

type Certificate

type Certificate struct {
	Certificate []byte `json:"certificate"`
	Fingerprint string `json:"fingerprint"`
}

Certificate certificate structure.

type CertificateChain

type CertificateChain struct {
	Name         string   `json:"name"`
	Fingerprints []string `json:"fingerprints"`
}

CertificateChain certificate chain.

type ComponentInfo

type ComponentInfo struct {
	ComponentID   *string         `json:"id,omitempty"`
	ComponentType string          `json:"type"`
	Version       string          `json:"version"`
	Annotations   json.RawMessage `json:"annotations,omitempty"`
	DownloadInfo
	DecryptionInfo DecryptionInfo `json:"decryptionInfo"`
	Signs          Signs          `json:"signs"`
}

ComponentInfo decrypted component info.

func (ComponentInfo) String

func (component ComponentInfo) String() string

type ComponentStatus

type ComponentStatus struct {
	ComponentID   string          `json:"id"`
	ComponentType string          `json:"type"`
	Version       string          `json:"version"`
	NodeID        *string         `json:"nodeId,omitempty"`
	Status        string          `json:"status"`
	Annotations   json.RawMessage `json:"annotations,omitempty"`
	ErrorInfo     *ErrorInfo      `json:"errorInfo,omitempty"`
}

ComponentStatus component status.

type ConnectionInfo

type ConnectionInfo struct {
	SendParams    SendParams    `json:"sendParams"`
	ReceiveParams ReceiveParams `json:"receiveParams"`
}

ConnectionInfo AMQP connection info.

type CoreAlert

type CoreAlert struct {
	AlertItem
	NodeID        string `json:"nodeId"`
	CoreComponent string `json:"coreComponent"`
	Message       string `json:"message"`
}

CoreAlert system alert structure.

type DecryptionInfo

type DecryptionInfo struct {
	BlockAlg     string `json:"blockAlg"`
	BlockIv      []byte `json:"blockIv"`
	BlockKey     []byte `json:"blockKey"`
	AsymAlg      string `json:"asymAlg"`
	ReceiverInfo *struct {
		Serial string `json:"serial"`
		Issuer []byte `json:"issuer"`
	} `json:"receiverInfo"`
}

DecryptionInfo update decryption info.

type DeltaUnitStatus

type DeltaUnitStatus struct {
	MessageType  string             `json:"messageType"`
	IsDeltaInfo  bool               `json:"isDeltaInfo"`
	UnitConfig   []UnitConfigStatus `json:"unitConfig,omitempty"`
	Nodes        []NodeInfo         `json:"nodes,omitempty"`
	Services     []ServiceStatus    `json:"services,omitempty"`
	Instances    []InstanceStatus   `json:"instances,omitempty"`
	Layers       []LayerStatus      `json:"layers,omitempty"`
	Components   []ComponentStatus  `json:"components,omitempty"`
	UnitSubjects []string           `json:"unitSubjects,omitempty"`
}

DeltaUnitStatus delta unit status structure.

type DeprovisioningRequest

type DeprovisioningRequest struct {
	MessageType string `json:"messageType"`
	NodeID      string `json:"nodeId"`
	Password    string `json:"password"`
}

DeprovisioningRequest message.

type DeprovisioningResponse

type DeprovisioningResponse struct {
	MessageType string     `json:"messageType"`
	NodeID      string     `json:"nodeId"`
	ErrorInfo   *ErrorInfo `json:"errorInfo,omitempty"`
}

DeprovisioningResponse message.

type DesiredStatus

type DesiredStatus struct {
	MessageType       string             `json:"messageType"`
	UnitConfig        *UnitConfig        `json:"unitConfig,omitempty"`
	Nodes             []NodeStatus       `json:"nodes"`
	Components        []ComponentInfo    `json:"components"`
	Layers            []LayerInfo        `json:"layers"`
	Services          []ServiceInfo      `json:"services"`
	Instances         []InstanceInfo     `json:"instances"`
	FOTASchedule      ScheduleRule       `json:"fotaSchedule"`
	SOTASchedule      ScheduleRule       `json:"sotaSchedule"`
	Certificates      []Certificate      `json:"certificates,omitempty"`
	CertificateChains []CertificateChain `json:"certificateChains,omitempty"`
}

DesiredStatus desired status.

type DeviceAllocateAlert

type DeviceAllocateAlert struct {
	AlertItem
	aostypes.InstanceIdent
	NodeID  string `json:"nodeId"`
	Device  string `json:"device"`
	Message string `json:"message"`
}

DeviceAllocateAlert device allocate alert structure.

type DeviceInfo

type DeviceInfo struct {
	Name        string   `json:"name"`
	SharedCount int      `json:"sharedCount,omitempty"`
	Groups      []string `json:"groups,omitempty"`
	HostDevices []string `json:"hostDevices"`
}

DeviceInfo device information.

type DownloadAlert

type DownloadAlert struct {
	AlertItem
	TargetType      string `json:"targetType"`
	TargetID        string `json:"targetId"`
	Version         string `json:"version"`
	Message         string `json:"message"`
	URL             string `json:"url"`
	DownloadedBytes string `json:"downloadedBytes"`
	TotalBytes      string `json:"totalBytes"`
}

DownloadAlert download alert structure.

type DownloadInfo

type DownloadInfo struct {
	URLs   []string `json:"urls"`
	Sha256 []byte   `json:"sha256"`
	Size   uint64   `json:"size"`
}

DownloadInfo struct contains how to download item.

type EnvVarInfo

type EnvVarInfo struct {
	Name  string     `json:"name"`
	Value string     `json:"value"`
	TTL   *time.Time `json:"ttl"`
}

EnvVarInfo env info with id and time to live.

type EnvVarStatus

type EnvVarStatus struct {
	Name      string     `json:"name"`
	ErrorInfo *ErrorInfo `json:"error,omitempty"`
}

EnvVarStatus env status with error message.

type EnvVarsInstanceInfo

type EnvVarsInstanceInfo struct {
	InstanceFilter
	Variables []EnvVarInfo `json:"variables"`
}

EnvVarsInstanceInfo struct with envs and related service and user.

type EnvVarsInstanceStatus

type EnvVarsInstanceStatus struct {
	InstanceFilter
	Statuses []EnvVarStatus `json:"statuses"`
}

EnvVarsInstanceStatus struct with envs status and related service and user.

type ErrorInfo

type ErrorInfo struct {
	AosCode  int    `json:"aosCode"`
	ExitCode int    `json:"exitCode"`
	Message  string `json:"message,omitempty"`
}

ErrorInfo error information.

type ExchangeParams

type ExchangeParams struct {
	Name       string `json:"name"`
	Durable    bool   `json:"durable"`
	AutoDetect bool   `json:"autoDetect"`
	Internal   bool   `json:"internal"`
	NoWait     bool   `json:"noWait"`
}

ExchangeParams AMQP exchange parameters.

type FileSystemMount

type FileSystemMount struct {
	Destination string   `json:"destination"`
	Type        string   `json:"type,omitempty"`
	Source      string   `json:"source,omitempty"`
	Options     []string `json:"options,omitempty"`
}

FileSystemMount specifies a mount instructions.

type FinishProvisioningRequest

type FinishProvisioningRequest struct {
	MessageType  string           `json:"messageType"`
	NodeID       string           `json:"nodeId"`
	Certificates []IssuedCertData `json:"certificates"`
	Password     string           `json:"password"`
}

FinishProvisioningRequest message.

type FinishProvisioningResponse

type FinishProvisioningResponse struct {
	MessageType string     `json:"messageType"`
	NodeID      string     `json:"nodeId"`
	ErrorInfo   *ErrorInfo `json:"errorInfo,omitempty"`
}

FinishProvisioningResponse message.

type HostInfo

type HostInfo struct {
	IP       string `json:"ip"`
	Hostname string `json:"hostname"`
}

HostInfo struct represents entry in /etc/hosts.

type InstallCertData

type InstallCertData struct {
	Type        string `json:"type"`
	NodeID      string `json:"nodeId,omitempty"`
	Serial      string `json:"serial"`
	Status      string `json:"status"`
	Description string `json:"description,omitempty"`
}

InstallCertData install certificate data.

type InstallUnitCertsConfirmation

type InstallUnitCertsConfirmation struct {
	MessageType  string            `json:"messageType"`
	Certificates []InstallCertData `json:"certificates"`
}

InstallUnitCertsConfirmation install unit certificates confirmation.

type InstanceFilter

type InstanceFilter struct {
	ServiceID *string `json:"serviceId,omitempty"`
	SubjectID *string `json:"subjectId,omitempty"`
	Instance  *uint64 `json:"instance,omitempty"`
}

InstanceFilter instance filter structure.

func NewInstanceFilter

func NewInstanceFilter(serviceID, subjectID string, instance int64) (filter InstanceFilter)

type InstanceInfo

type InstanceInfo struct {
	ServiceID    string   `json:"serviceId"`
	SubjectID    string   `json:"subjectId"`
	Priority     uint64   `json:"priority"`
	NumInstances uint64   `json:"numInstances"`
	Labels       []string `json:"labels"`
}

InstanceInfo decrypted desired instance runtime info.

type InstanceMonitoringData

type InstanceMonitoringData struct {
	aostypes.InstanceIdent
	NodeID string                    `json:"nodeId"`
	Items  []aostypes.MonitoringData `json:"items"`
}

InstanceMonitoringData monitoring data for service.

type InstanceQuotaAlert

type InstanceQuotaAlert struct {
	AlertItem
	aostypes.InstanceIdent
	Parameter string `json:"parameter"`
	Value     uint64 `json:"value"`
	Status    string `json:"-"`
}

InstanceQuotaAlert instance quota alert structure.

type InstanceStatus

type InstanceStatus struct {
	aostypes.InstanceIdent
	ServiceVersion string     `json:"version"`
	StateChecksum  string     `json:"stateChecksum,omitempty"`
	Status         string     `json:"status"`
	NodeID         string     `json:"nodeId"`
	ErrorInfo      *ErrorInfo `json:"errorInfo,omitempty"`
}

InstanceStatus service instance runtime status.

type IssueCertData

type IssueCertData struct {
	Type   string `json:"type"`
	NodeID string `json:"nodeId,omitempty"`
	Csr    string `json:"csr"`
}

IssueCertData issue certificate data.

type IssueUnitCerts

type IssueUnitCerts struct {
	MessageType string          `json:"messageType"`
	Requests    []IssueCertData `json:"requests"`
}

IssueUnitCerts issue unit certificates request.

type IssuedCertData

type IssuedCertData struct {
	Type             string `json:"type"`
	NodeID           string `json:"nodeId,omitempty"`
	CertificateChain string `json:"certificateChain"`
}

IssuedCertData issued unit certificate data.

type IssuedUnitCerts

type IssuedUnitCerts struct {
	MessageType  string           `json:"messageType"`
	Certificates []IssuedCertData `json:"certificates"`
}

IssuedUnitCerts issued unit certificates info.

type LayerInfo

type LayerInfo struct {
	LayerID string `json:"id"`
	Digest  string `json:"digest"`
	Version string `json:"version"`
	DownloadInfo
	DecryptionInfo DecryptionInfo `json:"decryptionInfo"`
	Signs          Signs          `json:"signs"`
}

LayerInfo decrypted layer info.

func (LayerInfo) String

func (layer LayerInfo) String() string

type LayerStatus

type LayerStatus struct {
	LayerID   string     `json:"id"`
	Digest    string     `json:"digest"`
	Version   string     `json:"version"`
	Status    string     `json:"status"`
	ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"`
}

LayerStatus layer status.

type LogFilter

type LogFilter struct {
	From          *time.Time        `json:"from"`
	Till          *time.Time        `json:"till"`
	NodeIDs       []string          `json:"nodeIds,omitempty"`
	UploadOptions *LogUploadOptions `json:"uploadOptions,omitempty"`
	InstanceFilter
}

LogFilter request log message.

type LogUploadOptions

type LogUploadOptions struct {
	Type           string     `json:"type"`
	URL            string     `json:"url"`
	BearerToken    string     `json:"bearerToken"`
	BearerTokenTTL *time.Time `json:"bearerTokenTtl"`
}

LogUploadOptions request log message.

type Message

type Message struct {
	Header MessageHeader `json:"header"`
	Data   interface{}   `json:"data"`
}

Message structure for AOS messages.

type MessageHeader

type MessageHeader struct {
	Version  uint64 `json:"version"`
	SystemID string `json:"systemId"`
}

MessageHeader message header.

type Monitoring

type Monitoring struct {
	MessageType      string                   `json:"messageType"`
	Nodes            []NodeMonitoringData     `json:"nodes"`
	ServiceInstances []InstanceMonitoringData `json:"serviceInstances"`
}

Monitoring monitoring message structure.

type NewState

type NewState struct {
	MessageType string `json:"messageType"`
	aostypes.InstanceIdent
	Checksum string `json:"stateChecksum"`
	State    string `json:"state"`
}

NewState new state structure.

type NodeConfig

type NodeConfig struct {
	NodeID         *string                      `json:"nodeId,omitempty"`
	NodeType       string                       `json:"nodeType"`
	ResourceRatios *aostypes.ResourceRatiosInfo `json:"resourceRatios,omitempty"`
	AlertRules     *aostypes.AlertRules         `json:"alertRules,omitempty"`
	Devices        []DeviceInfo                 `json:"devices,omitempty"`
	Resources      []ResourceInfo               `json:"resources,omitempty"`
	Labels         []string                     `json:"labels,omitempty"`
	Priority       uint32                       `json:"priority,omitempty"`
}

NodeConfig node configuration.

type NodeInfo

type NodeInfo struct {
	NodeID     string                 `json:"id"`
	NodeType   string                 `json:"type"`
	Name       string                 `json:"name"`
	Status     string                 `json:"status"`
	CPUs       []CPUInfo              `json:"cpus,omitempty"`
	OSType     string                 `json:"osType"`
	MaxDMIPs   uint64                 `json:"maxDmips"`
	TotalRAM   uint64                 `json:"totalRam"`
	Attrs      map[string]interface{} `json:"attrs,omitempty"`
	Partitions []PartitionInfo        `json:"partitions,omitempty"`
	ErrorInfo  *ErrorInfo             `json:"errorInfo,omitempty"`
}

NodeInfo node information.

func (*NodeInfo) GetAosComponents

func (nodeInfo *NodeInfo) GetAosComponents() ([]string, error)

func (*NodeInfo) GetNodeRunners

func (nodeInfo *NodeInfo) GetNodeRunners() ([]string, error)

func (*NodeInfo) IsMainNode

func (nodeInfo *NodeInfo) IsMainNode() bool

type NodeMonitoringData

type NodeMonitoringData struct {
	NodeID string                    `json:"nodeId"`
	Items  []aostypes.MonitoringData `json:"items"`
}

NodeMonitoringData node monitoring data.

type NodeStatus

type NodeStatus struct {
	NodeID string `json:"nodeId"`
	Status string `json:"status"`
}

NodeStatus node status.

type OverrideEnvVars

type OverrideEnvVars struct {
	MessageType string                `json:"messageType"`
	Items       []EnvVarsInstanceInfo `json:"items"`
}

OverrideEnvVars request to override service environment variables.

type OverrideEnvVarsStatus

type OverrideEnvVarsStatus struct {
	MessageType string                  `json:"messageType"`
	Statuses    []EnvVarsInstanceStatus `json:"statuses"`
}

OverrideEnvVarsStatus override env status.

type PartitionInfo

type PartitionInfo struct {
	Name      string   `json:"name"`
	Types     []string `json:"types"`
	TotalSize uint64   `json:"totalSize"`
	Path      string   `json:"-"`
}

PartitionInfo partition information.

type PushLog

type PushLog struct {
	MessageType string     `json:"messageType"`
	NodeID      string     `json:"nodeId"`
	LogID       string     `json:"logId"`
	PartsCount  uint64     `json:"partsCount,omitempty"`
	Part        uint64     `json:"part,omitempty"`
	Content     []byte     `json:"content,omitempty"`
	Status      string     `json:"status"`
	ErrorInfo   *ErrorInfo `json:"errorInfo,omitempty"`
}

PushLog push service log structure.

type QueueInfo

type QueueInfo struct {
	Name             string `json:"name"`
	Durable          bool   `json:"durable"`
	DeleteWhenUnused bool   `json:"deleteWhenUnused"`
	Exclusive        bool   `json:"exclusive"`
	NoWait           bool   `json:"noWait"`
}

QueueInfo AMQP queue info.

type ReceiveParams

type ReceiveParams struct {
	Host      string    `json:"host"`
	User      string    `json:"user"`
	Password  string    `json:"password"`
	Consumer  string    `json:"consumer"`
	AutoAck   bool      `json:"autoAck"`
	Exclusive bool      `json:"exclusive"`
	NoLocal   bool      `json:"noLocal"`
	NoWait    bool      `json:"noWait"`
	Queue     QueueInfo `json:"queue"`
}

ReceiveParams AMQP receive parameters.

type ReceivedMessage

type ReceivedMessage struct {
	Header MessageHeader   `json:"header"`
	Data   json.RawMessage `json:"data"`
}

ReceivedMessage structure for Aos incoming messages.

type RenewCertData

type RenewCertData struct {
	Type      string    `json:"type"`
	NodeID    string    `json:"nodeId,omitempty"`
	Serial    string    `json:"serial"`
	ValidTill time.Time `json:"validTill"`
}

RenewCertData renew certificate data.

type RenewCertsNotification

type RenewCertsNotification struct {
	MessageType  string          `json:"messageType"`
	Certificates []RenewCertData `json:"certificates"`
	UnitSecrets  UnitSecrets     `json:"unitSecrets"`
}

RenewCertsNotification renew certificate notification from cloud with pwd.

type RequestLog

type RequestLog struct {
	MessageType string    `json:"messageType"`
	LogID       string    `json:"logId"`
	LogType     string    `json:"logType"`
	Filter      LogFilter `json:"filter"`
}

RequestLog request log message.

type ResourceInfo

type ResourceInfo struct {
	Name   string            `json:"name"`
	Groups []string          `json:"groups,omitempty"`
	Mounts []FileSystemMount `json:"mounts,omitempty"`
	Env    []string          `json:"env,omitempty"`
	Hosts  []HostInfo        `json:"hosts,omitempty"`
}

ResourceInfo resource information.

type ResourceValidateAlert

type ResourceValidateAlert struct {
	AlertItem
	NodeID string      `json:"nodeId"`
	Name   string      `json:"name"`
	Errors []ErrorInfo `json:"errors"`
}

ResourceValidateAlert resource validate alert structure.

type ScheduleRule

type ScheduleRule struct {
	TTL       uint64           `json:"ttl"`
	Type      string           `json:"type"`
	Timetable []TimetableEntry `json:"timetable"`
}

ScheduleRule rule for performing schedule update.

type SendParams

type SendParams struct {
	Host      string         `json:"host"`
	User      string         `json:"user"`
	Password  string         `json:"password"`
	Mandatory bool           `json:"mandatory"`
	Immediate bool           `json:"immediate"`
	Exchange  ExchangeParams `json:"exchange"`
}

SendParams AMQP send parameters.

type ServiceDiscoveryRequest

type ServiceDiscoveryRequest struct{}

ServiceDiscoveryRequest service discovery request.

type ServiceDiscoveryResponse

type ServiceDiscoveryResponse struct {
	Version    uint64         `json:"version"`
	Connection ConnectionInfo `json:"connection"`
}

ServiceDiscoveryResponse service discovery response.

type ServiceInfo

type ServiceInfo struct {
	ServiceID  string `json:"id"`
	ProviderID string `json:"providerId"`
	Version    string `json:"version"`
	DownloadInfo
	DecryptionInfo DecryptionInfo `json:"decryptionInfo"`
	Signs          Signs          `json:"signs"`
}

ServiceInfo decrypted service info.

func (ServiceInfo) String

func (service ServiceInfo) String() string

type ServiceInstanceAlert

type ServiceInstanceAlert struct {
	AlertItem
	aostypes.InstanceIdent
	ServiceVersion string `json:"version"`
	Message        string `json:"message"`
}

ServiceInstanceAlert system alert structure.

type ServiceStatus

type ServiceStatus struct {
	ServiceID string     `json:"id"`
	Version   string     `json:"version"`
	Status    string     `json:"status"`
	ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"`
}

ServiceStatus service status.

type Signs

type Signs struct {
	ChainName        string   `json:"chainName"`
	Alg              string   `json:"alg"`
	Value            []byte   `json:"value"`
	TrustedTimestamp string   `json:"trustedTimestamp"`
	OcspValues       []string `json:"ocspValues"`
}

Signs message signature.

type StartProvisioningRequest

type StartProvisioningRequest struct {
	MessageType string `json:"messageType"`
	NodeID      string `json:"nodeId"`
	Password    string `json:"password"`
}

StartProvisioningRequest message.

type StartProvisioningResponse

type StartProvisioningResponse struct {
	MessageType string          `json:"messageType"`
	NodeID      string          `json:"nodeId"`
	ErrorInfo   *ErrorInfo      `json:"errorInfo,omitempty"`
	CSRs        []IssueCertData `json:"csrs"`
}

StartProvisioningResponse message.

type StateAcceptance

type StateAcceptance struct {
	MessageType string `json:"messageType"`
	aostypes.InstanceIdent
	Checksum string `json:"checksum"`
	Result   string `json:"result"`
	Reason   string `json:"reason"`
}

StateAcceptance state acceptance message.

type StateRequest

type StateRequest struct {
	MessageType string `json:"messageType"`
	aostypes.InstanceIdent
	Default bool `json:"default"`
}

StateRequest state request structure.

type SystemAlert

type SystemAlert struct {
	AlertItem
	NodeID  string `json:"nodeId"`
	Message string `json:"message"`
}

SystemAlert system alert structure.

type SystemQuotaAlert

type SystemQuotaAlert struct {
	AlertItem
	NodeID    string `json:"nodeId"`
	Parameter string `json:"parameter"`
	Value     uint64 `json:"value"`
	Status    string `json:"-"`
}

SystemQuotaAlert system quota alert structure.

type TimeSlot

type TimeSlot struct {
	Start aostypes.Time `json:"start"`
	End   aostypes.Time `json:"end"`
}

TimeSlot time slot with start and finish time.

type TimetableEntry

type TimetableEntry struct {
	DayOfWeek uint       `json:"dayOfWeek"`
	TimeSlots []TimeSlot `json:"timeSlots"`
}

TimetableEntry entry for update timetable.

type UnitConfig

type UnitConfig struct {
	FormatVersion interface{}  `json:"formatVersion"`
	Version       string       `json:"version"`
	Nodes         []NodeConfig `json:"nodes"`
}

UnitConfig unit configuration.

type UnitConfigStatus

type UnitConfigStatus struct {
	Version   string     `json:"version"`
	Status    string     `json:"status"`
	ErrorInfo *ErrorInfo `json:"errorInfo,omitempty"`
}

UnitConfigStatus unit config status.

type UnitSecrets

type UnitSecrets struct {
	Version string            `json:"version"`
	Nodes   map[string]string `json:"nodes"`
}

UnitSecrets keeps secrets for nodes.

type UnitStatus

type UnitStatus struct {
	MessageType  string             `json:"messageType"`
	IsDeltaInfo  bool               `json:"isDeltaInfo"`
	UnitConfig   []UnitConfigStatus `json:"unitConfig"`
	Nodes        []NodeInfo         `json:"nodes"`
	Services     []ServiceStatus    `json:"services"`
	Instances    []InstanceStatus   `json:"instances"`
	Layers       []LayerStatus      `json:"layers,omitempty"`
	Components   []ComponentStatus  `json:"components"`
	UnitSubjects []string           `json:"unitSubjects"`
}

UnitStatus unit status structure.

type UpdateState

type UpdateState struct {
	MessageType string `json:"messageType"`
	aostypes.InstanceIdent
	Checksum string `json:"stateChecksum"`
	State    string `json:"state"`
}

UpdateState state update message.

Jump to

Keyboard shortcuts

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