Documentation ¶
Index ¶
- type AlertRuleParam
- type AlertRules
- type DeviceInfo
- type Duration
- type FileSystemMount
- type FirewallRule
- type Host
- type InstanceIdent
- type InstanceInfo
- type LayerInfo
- type NetworkParameters
- type NodeUnitConfig
- type PartitionAlertRuleParam
- type ResourceInfo
- type RunParameters
- type ServiceConfig
- type ServiceDevice
- type ServiceInfo
- type ServiceManifest
- type ServiceQuotas
- type Time
- type UnitConfig
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertRuleParam ¶
type AlertRuleParam struct { MinTimeout Duration `json:"minTimeout"` MinThreshold uint64 `json:"minThreshold"` MaxThreshold uint64 `json:"maxThreshold"` }
AlertRuleParam describes alert rule.
type AlertRules ¶
type AlertRules struct { RAM *AlertRuleParam `json:"ram,omitempty"` CPU *AlertRuleParam `json:"cpu,omitempty"` UsedDisks []PartitionAlertRuleParam `json:"usedDisks,omitempty"` InTraffic *AlertRuleParam `json:"inTraffic,omitempty"` OutTraffic *AlertRuleParam `json:"outTraffic,omitempty"` }
AlertRules define service monitoring alerts rules.
type DeviceInfo ¶
type DeviceInfo struct { Name string `json:"name"` Groups []string `json:"groups,omitempty"` HostDevices []string `json:"hostDevices"` }
DeviceInfo device information.
type Duration ¶
Duration represents duration in format "00:00:00".
func (Duration) MarshalJSON ¶
MarshalJSON marshals JSON Duration type.
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON unmarshals JSON Duration type.
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 FirewallRule ¶
type FirewallRule struct { DstIP string `json:"dstIp"` DstPort string `json:"dstPort"` Proto string `json:"proto"` SrcIP string `json:"srcIp"` }
FirewallRule firewall rule.
type InstanceIdent ¶
type InstanceIdent struct { ServiceID string `json:"serviceId"` SubjectID string `json:"subjectId"` Instance uint64 `json:"instance"` }
InstanceIdent instance identification information.
type InstanceInfo ¶
type InstanceInfo struct { InstanceIdent NetworkParameters UID uint32 `json:"uid"` Priority uint64 `json:"priority"` StoragePath string `json:"storagePath"` StatePath string `json:"statePath"` }
InstanceInfo instance information to start it.
type LayerInfo ¶
type LayerInfo struct { VersionInfo ID string `json:"id"` Digest string `json:"digest"` URL string `json:"url"` Sha256 []byte `json:"sha256"` Sha512 []byte `json:"sha512"` Size uint64 `json:"size"` }
LayerInfo layer info.
type NetworkParameters ¶
type NetworkParameters struct { NetworkID string Subnet string IP string VlanID uint64 DNSServers []string FirewallRules []FirewallRule }
NetworkParameters networks parameters.
type NodeUnitConfig ¶
type NodeUnitConfig struct { NodeType string `json:"nodeType"` Devices []DeviceInfo `json:"devices,omitempty"` Resources []ResourceInfo `json:"resources,omitempty"` Labels []string `json:"labels,omitempty"` Priority uint32 `json:"priority,omitempty"` }
NodeConfig node configuration.
type PartitionAlertRuleParam ¶
type PartitionAlertRuleParam struct { AlertRuleParam Name string `json:"name"` }
PartitionAlertRuleParam describes alert rule.
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 []Host `json:"hosts,omitempty"` }
ResourceInfo resource information.
type RunParameters ¶
type RunParameters struct { StartInterval Duration `json:"startInterval,omitempty"` StartBurst uint `json:"startBurst,omitempty"` RestartInterval Duration `json:"restartInterval,omitempty"` }
RunParameters service startup parameters.
type ServiceConfig ¶
type ServiceConfig struct { Created time.Time `json:"created"` Author string `json:"author"` Hostname *string `json:"hostname,omitempty"` Runner string `json:"runner"` Sysctl map[string]string `json:"sysctl,omitempty"` OfflineTTL Duration `json:"offlineTtl,omitempty"` Quotas ServiceQuotas `json:"quotas"` AllowedConnections map[string]struct{} `json:"allowedConnections,omitempty"` Devices []ServiceDevice `json:"devices,omitempty"` Resources []string `json:"resources,omitempty"` Permissions map[string]map[string]string `json:"permissions,omitempty"` AlertRules *AlertRules `json:"alertRules,omitempty"` RunParameters RunParameters `json:"runParameters,omitempty"` }
ServiceConfig Aos service configuration.
type ServiceDevice ¶
ServiceDevice struct with service divices rules.
type ServiceInfo ¶
type ServiceInfo struct { VersionInfo ID string `json:"id"` ProviderID string `json:"providerId"` GID uint32 `json:"gid"` URL string `json:"url"` Sha256 []byte `json:"sha256"` Sha512 []byte `json:"sha512"` Size uint64 `json:"size"` }
ServiceInfo service info.
type ServiceManifest ¶
type ServiceManifest struct { imagespec.Manifest AosService *imagespec.Descriptor `json:"aosService,omitempty"` }
ServiceManifest Aos service manifest.
type ServiceQuotas ¶
type ServiceQuotas struct { CPULimit *uint64 `json:"cpuLimit,omitempty"` RAMLimit *uint64 `json:"ramLimit,omitempty"` PIDsLimit *uint64 `json:"pidsLimit,omitempty"` NoFileLimit *uint64 `json:"noFileLimit,omitempty"` TmpLimit *uint64 `json:"tmpLimit,omitempty"` StateLimit *uint64 `json:"stateLimit,omitempty"` StorageLimit *uint64 `json:"storageLimit,omitempty"` UploadSpeed *uint64 `json:"uploadSpeed,omitempty"` DownloadSpeed *uint64 `json:"downloadSpeed,omitempty"` UploadLimit *uint64 `json:"uploadLimit,omitempty"` DownloadLimit *uint64 `json:"downloadLimit,omitempty"` }
ServiceQuotas service quotas representation.
type Time ¶
Time represents time in format "00:00:00".
func (Time) MarshalJSON ¶
MarshalJSON marshals JSON Time type.
func (*Time) UnmarshalJSON ¶
UnmarshalJSON unmarshals JSON Time type.
type UnitConfig ¶
type UnitConfig struct { FormatVersion uint64 `json:"formatVersion"` VendorVersion string `json:"vendorVersion"` Nodes []NodeUnitConfig `json:"nodes"` }
UnitConfig board configuration.
type VersionInfo ¶
type VersionInfo struct { AosVersion uint64 `json:"aosVersion"` VendorVersion string `json:"vendorVersion"` Description string `json:"description"` }
VersionInfo common version structure.