aostypes

package
v0.0.0-...-a7ee241 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 24

Documentation

Index

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"`
	SharedCount int      `json:"sharedCount,omitempty"`
	Groups      []string `json:"groups,omitempty"`
	HostDevices []string `json:"hostDevices"`
}

DeviceInfo device information.

type Duration

type Duration struct {
	time.Duration
}

Duration represents duration in format "00:00:00".

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() (b []byte, err error)

MarshalJSON marshals JSON Duration type.

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) (err error)

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 Host

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

Host struct represents entry in /etc/hosts.

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

type ServiceDevice struct {
	Name        string `json:"name"`
	Permissions string `json:"permissions"`
}

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

type Time struct {
	time.Time
}

Time represents time in format "00:00:00".

func (Time) MarshalJSON

func (t Time) MarshalJSON() (b []byte, err error)

MarshalJSON marshals JSON Time type.

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) (err error)

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.

Jump to

Keyboard shortcuts

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