zos

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ZMountType type
	ZMountType gridtypes.WorkloadType = "zmount"
	// NetworkType type
	NetworkType gridtypes.WorkloadType = "network"
	// NetworkLightType type
	NetworkLightType gridtypes.WorkloadType = "network-light"
	// ZDBType type
	ZDBType gridtypes.WorkloadType = "zdb"
	// ZMachineType type
	ZMachineType gridtypes.WorkloadType = "zmachine"
	// ZMachineLightType type
	ZMachineLightType gridtypes.WorkloadType = "zmachine-light"
	// VolumeType type
	VolumeType gridtypes.WorkloadType = "volume"
	//PublicIPv4Type type [deprecated]
	PublicIPv4Type gridtypes.WorkloadType = "ipv4"
	//PublicIPType type is the new way to assign public ips
	// to a VM. this has flags (V4, and V6) that has to be set.
	PublicIPType gridtypes.WorkloadType = "ip"
	// GatewayNameProxyType type
	GatewayNameProxyType gridtypes.WorkloadType = "gateway-name-proxy"
	// GatewayFQDNProxyType type
	GatewayFQDNProxyType gridtypes.WorkloadType = "gateway-fqdn-proxy"
	// QuantumSafeFSType type
	QuantumSafeFSType gridtypes.WorkloadType = "qsfs"
	// ZLogsType type
	ZLogsType gridtypes.WorkloadType = "zlogs"
)
View Source
const (
	ZDBModeUser = "user"
	ZDBModeSeq  = "seq"
)

Enumeration of the modes 0-db can operate in

View Source
const (
	MyceliumIPSeedLen = 6
)
View Source
const (
	MyceliumKeyLen = 32
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend string

func (Backend) AsAddress

func (b Backend) AsAddress() (string, error)

func (Backend) Valid

func (b Backend) Valid(tlsPassthrough bool) error

Parse accepts http://ip:port, http://ip or ip:port checks if backend string is a valid string based on the tlsPassthrough parameter ip:port is only valid in case of tlsPassthrough is true http://ip:port or http://ip is valid in case of tlsPassthrough is false

type Bytes

type Bytes []byte

Bytes value that is represented as hex when serialized to json

func BytesFromHex

func BytesFromHex(h string) (Bytes, error)

BytesFromHex creates bytes from hex

func MustBytesFromHex

func MustBytesFromHex(h string) Bytes

MustBytesFromHex like BytesFromHex but panics if h is not a valid hex string

func (Bytes) MarshalText

func (h Bytes) MarshalText() (text []byte, err error)

func (*Bytes) UnmarshalText

func (h *Bytes) UnmarshalText(text []byte) error

type DeviceType

type DeviceType string

DeviceType is the actual type of hardware that the storage device runs on, i.e. SSD or HDD

const (
	SSDDevice DeviceType = "ssd"
	HDDDevice DeviceType = "hdd"
)

Known device types

func (DeviceType) String

func (d DeviceType) String() string

func (DeviceType) Valid

func (d DeviceType) Valid() error

Valid validates device type

type Encryption

type Encryption struct {
	Algorithm EncryptionAlgorithm `json:"algorithm" toml:"algorithm"`
	Key       EncryptionKey       `json:"key" toml:"key"`
}

func (*Encryption) Challenge

func (c *Encryption) Challenge(w io.Writer) error

type EncryptionAlgorithm

type EncryptionAlgorithm string

type EncryptionKey

type EncryptionKey []byte

func (EncryptionKey) MarshalText

func (k EncryptionKey) MarshalText() ([]byte, error)

func (*EncryptionKey) UnmarshalText

func (k *EncryptionKey) UnmarshalText(data []byte) error

func (EncryptionKey) Valid

func (k EncryptionKey) Valid() error

type GPU

type GPU string

GPU ID Used by a VM, a GPU id is in the format <slot>/<vendor>/<device> This can be queried either from the node features on the chain or listed via the node rmb API. example of a valid gpu definition `0000:28:00.0/1002/731f“

func (GPU) Parts

func (g GPU) Parts() (slot, vendor, device string, err error)

type GatewayBase

type GatewayBase struct {
	// Passthrough whether to pass tls traffic or not
	TLSPassthrough bool `json:"tls_passthrough"`

	// Backends are list of backend ips (only one is supported atm)
	Backends []Backend `json:"backends"`

	// Network name to join [optional].
	// If set the backend IP can be a private ip in that network.
	// the network then must be
	// the same rules for tls-passthrough applies.
	Network *gridtypes.Name `json:"network,omitempty"`
}

GatewayBase definition. this will proxy name.<zos.domain> to backends

func (GatewayBase) Challenge

func (g GatewayBase) Challenge(w io.Writer) error

func (GatewayBase) Valid

func (g GatewayBase) Valid(getter gridtypes.WorkloadGetter) error

type GatewayFQDNProxy

type GatewayFQDNProxy struct {
	GatewayBase

	// FQDN the fully qualified domain name to use (cannot be present with Name)
	FQDN string `json:"fqdn"`
}

GatewayFQDNProxy definition. this will proxy name.<zos.domain> to backends

func (GatewayFQDNProxy) Capacity

func (g GatewayFQDNProxy) Capacity() (gridtypes.Capacity, error)

func (GatewayFQDNProxy) Challenge

func (g GatewayFQDNProxy) Challenge(w io.Writer) error

func (GatewayFQDNProxy) Valid

type GatewayFQDNResult

type GatewayFQDNResult struct {
}

GatewayProxyResult results

type GatewayNameProxy

type GatewayNameProxy struct {
	GatewayBase
	// Name the fully qualified domain name to use (cannot be present with Name)
	Name string `json:"name"`
}

GatewayNameProxy definition. this will proxy name.<zos.domain> to backends

func (GatewayNameProxy) Capacity

func (g GatewayNameProxy) Capacity() (gridtypes.Capacity, error)

func (GatewayNameProxy) Challenge

func (g GatewayNameProxy) Challenge(w io.Writer) error

func (GatewayNameProxy) Valid

type GatewayProxyResult

type GatewayProxyResult struct {
	FQDN string `json:"fqdn"`
}

GatewayProxyResult results

type MachineCapacity

type MachineCapacity struct {
	CPU    uint8          `json:"cpu"`
	Memory gridtypes.Unit `json:"memory"`
}

MachineCapacity structure

func (*MachineCapacity) Challenge

func (c *MachineCapacity) Challenge(w io.Writer) error

Challenge builder

func (*MachineCapacity) String

func (c *MachineCapacity) String() string

type MachineInterface

type MachineInterface struct {
	// Network name (znet name) to join
	Network gridtypes.Name `json:"network"`
	// IP of the zmachine on this network must be a valid Ip in the
	// selected network
	IP net.IP `json:"ip"`
}

MachineInterface structure

type MachineMount

type MachineMount struct {
	// Name is name of a zmount. The name must be a valid zmount
	// in the same deployment as the zmachine
	Name gridtypes.Name `json:"name"`
	// Mountpoint inside the container. Not used if the zmachine
	// is running in a vm mode.
	Mountpoint string `json:"mountpoint"`
}

MachineMount structure

func (*MachineMount) Challenge

func (m *MachineMount) Challenge(w io.Writer) error

Challenge builder

type MachineNetwork

type MachineNetwork struct {
	// PublicIP optional public IP attached to this machine. If set
	// it must be a valid name of a PublicIP workload in the same deployment
	PublicIP gridtypes.Name `json:"public_ip"`
	// Planetary support planetary network
	Planetary bool `json:"planetary"`

	// Mycelium IP config, if planetary is true, but Mycelium is not set we fall back
	// to yggdrasil support. Otherwise (if mycelium is set) a mycelium ip is used instead.
	Mycelium *MyceliumIP `json:"mycelium,omitempty"`

	// Interfaces list of user znets to join
	Interfaces []MachineInterface `json:"interfaces"`
}

MachineNetwork structure

func (*MachineNetwork) Challenge

func (n *MachineNetwork) Challenge(w io.Writer) error

Challenge builder

type MachineNetworkLight

type MachineNetworkLight struct {
	// Mycelium IP config, if planetary is true, but Mycelium is not set we fall back
	// to yggdrasil support. Otherwise (if mycelium is set) a mycelium ip is used instead.
	Mycelium *MyceliumIP `json:"mycelium,omitempty"`

	// Interfaces list of user znets to join
	Interfaces []MachineInterface `json:"interfaces"`
}

MachineNetworkLight structure

func (*MachineNetworkLight) Challenge

func (n *MachineNetworkLight) Challenge(w io.Writer) error

Challenge builder

type Mycelium

type Mycelium struct {
	// Key is the key of the mycelium peer in the mycelium node
	// associated with this network.
	// It's provided by the user so it can be later moved to other nodes
	// without losing the key.
	Key Bytes `json:"hex_key"`
	// An optional mycelium peer list to be used with this node, otherwise
	// the default peer list is used.
	Peers []MyceliumPeer `json:"peers"`
}

func (*Mycelium) Challenge

func (c *Mycelium) Challenge(b io.Writer) error

func (*Mycelium) Valid

func (c *Mycelium) Valid() error

type MyceliumIP

type MyceliumIP struct {
	// Network name (znet name) to join
	Network gridtypes.Name
	// Seed is a six bytes random number that is used
	// as a seed to derive a vm mycelium IP.
	//
	// This means that a VM "ip" can be moved to another VM if needed
	// by simply using the same seed.
	// This of course will only work if the network mycelium setup is using
	// the same HexKey
	Seed Bytes `json:"hex_seed"`
}

func (*MyceliumIP) Challenge

func (c *MyceliumIP) Challenge(w io.Writer) error

type MyceliumPeer

type MyceliumPeer string

type NetID

type NetID string

NetID is a type defining the ID of a network

func NetworkID

func NetworkID(twin uint32, network gridtypes.Name) NetID

NetworkID construct a network ID based on a userID and network name

func NetworkIDFromWorkloadID

func NetworkIDFromWorkloadID(wl gridtypes.WorkloadID) (NetID, error)

func (NetID) String

func (i NetID) String() string

type Network

type Network struct {
	// IP range of the network, must be an IPv4 /16
	// for example a 10.1.0.0/16
	NetworkIPRange gridtypes.IPNet `json:"ip_range"`

	// IPV4 subnet for this network resource
	// this must be a valid subnet of the entire network ip range.
	// for example 10.1.1.0/24
	Subnet gridtypes.IPNet `json:"subnet"`

	// The private wg key of this node (this peer) which is installing this
	// network workload right now.
	// This has to be filled in by the user (and not generated for example)
	// because other peers need to be installed as well (with this peer public key)
	// hence it's easier to configure everything one time at the user side and then
	// apply everything on all nodes at once
	WGPrivateKey string `json:"wireguard_private_key"`
	// WGListenPort is the wireguard listen port on this node. this has
	// to be filled in by the user for same reason as private key (other nodes need to know about it)
	// To find a free port you have to ask the node first by a call over RMB about which ports are possible
	// to use.
	WGListenPort uint16 `json:"wireguard_listen_port"`

	// Peers is a list of other peers in this network
	Peers []Peer `json:"peers"`

	// Optional mycelium configuration. If provided
	// VMs in this network can use the mycelium feature.
	// if no mycelium configuration is provided, vms can't
	// get mycelium IPs.
	Mycelium *Mycelium `json:"mycelium,omitempty"`
}

Network is the description of a part of a network local to a specific node. A network workload defines a wireguard network that is usually spans multiple nodes. One of the nodes must work as an access node in other words, it must be reachable from other nodes, hence it needs to have a `PublicConfig`. Since the user library creates all deployments upfront then all wireguard keys, and ports must be pre-determinstic and must be also created upfront. A network structure basically must consist of - The network information (IP range) must be an ipv4 /16 range - The local (node) peer definition (subnet of the network ip range, wireguard secure key, wireguard port if any) - List of other peers that are part of the same network with their own config - For each PC or a laptop (for each wireguard peer) there must be a peer in the peer list (on all nodes) This is why this can get complicated.

func (Network) Capacity

func (n Network) Capacity() (gridtypes.Capacity, error)

Capacity implementation

func (Network) Challenge

func (n Network) Challenge(b io.Writer) error

Challenge implements WorkloadData

func (Network) Valid

func (n Network) Valid(getter gridtypes.WorkloadGetter) error

Valid checks if the network resource is valid.

type NetworkLight

type NetworkLight struct {
	// IPV4 subnet for this network resource
	// this must be a valid subnet of the entire network ip range.
	// for example 10.1.1.0/24
	Subnet gridtypes.IPNet `json:"subnet"`

	// Optional mycelium configuration. If provided
	// VMs in this network can use the mycelium feature.
	// if no mycelium configuration is provided, vms can't
	// get mycelium IPs.
	Mycelium Mycelium `json:"mycelium,omitempty"`
}

NetworkLight is the description of a part of a network local to a specific node. A network workload defines a wireguard network that is usually spans multiple nodes. One of the nodes must work as an access node in other words, it must be reachable from other nodes, hence it needs to have a `PublicConfig`. Since the user library creates all deployments upfront then all wireguard keys, and ports must be pre-deterministic and must be also created upfront. A network structure basically must consist of - The network information (IP range) must be an ipv4 /16 range - The local (node) peer definition (subnet of the network ip range, wireguard secure key, wireguard port if any) - List of other peers that are part of the same network with their own config - For each PC or a laptop (for each wireguard peer) there must be a peer in the peer list (on all nodes) This is why this can get complicated.

func (NetworkLight) Capacity

func (n NetworkLight) Capacity() (gridtypes.Capacity, error)

Capacity implementation

func (NetworkLight) Challenge

func (n NetworkLight) Challenge(b io.Writer) error

Challenge implements WorkloadData

func (NetworkLight) Valid

func (n NetworkLight) Valid(getter gridtypes.WorkloadGetter) error

Valid checks if the network resource is valid.

type Peer

type Peer struct {
	// IPV4 subnet of the network resource of the peer
	Subnet gridtypes.IPNet `json:"subnet"`
	// WGPublicKey of the peer (driven from its private key)
	WGPublicKey string `json:"wireguard_public_key"`
	// Allowed Ips is related to his subnet.
	// todo: remove and derive from subnet
	AllowedIPs []gridtypes.IPNet `json:"allowed_ips"`
	// Entrypoint of the peer
	Endpoint string `json:"endpoint"`
}

Peer is the description of a peer of a NetResource

func (Peer) Challenge

func (p Peer) Challenge(w io.Writer) error

Challenge for peer

func (*Peer) Valid

func (p *Peer) Valid() error

Valid checks if peer is valid

type PublicIP

type PublicIP struct {
	// V4 use one of the reserved Ipv4 from your contract. The Ipv4
	// itself costs money + the network traffic
	V4 bool `json:"v4"`
	// V6 get an ipv6 for the VM. this is for free
	// but the consumed capacity (network traffic) is not
	V6 bool `json:"v6"`
}

func (PublicIP) Capacity

func (p PublicIP) Capacity() (gridtypes.Capacity, error)

Capacity implementation

func (PublicIP) Challenge

func (p PublicIP) Challenge(w io.Writer) error

Challenge implementation

func (PublicIP) Valid

func (p PublicIP) Valid(getter gridtypes.WorkloadGetter) error

Valid validate public ip input

type PublicIP4

type PublicIP4 struct{}

PublicIP4 structure this is a deprecated type and only kept here for backward compatibility with older deployments. Please use PublicIP instead

func (PublicIP4) Capacity

func (p PublicIP4) Capacity() (gridtypes.Capacity, error)

Capacity implementation

func (PublicIP4) Challenge

func (p PublicIP4) Challenge(b io.Writer) error

Challenge implementation

func (PublicIP4) Valid

func (p PublicIP4) Valid(getter gridtypes.WorkloadGetter) error

Valid validate public ip input

type PublicIPResult

type PublicIPResult struct {
	// IP of the VM. The IP must be part of the subnet available in the network
	// resource defined by the networkID on this node
	IP gridtypes.IPNet `json:"ip"`
	// IPv6 of the VM.
	IPv6 gridtypes.IPNet `json:"ip6"`
	// Gateway: this fields is only here because we have no idea what is the
	// gateway of that ip without consulting the farmer. Currently this
	// component does not exist. hence as a temporaray solution the user must
	// also provide
	Gateway net.IP `json:"gateway"`
}

PublicIPResult result returned by publicIP reservation

func (*PublicIPResult) HasIPv4

func (p *PublicIPResult) HasIPv4() bool

func (*PublicIPResult) HasIPv6

func (p *PublicIPResult) HasIPv6() bool

type QuantumCompression

type QuantumCompression struct {
	Algorithm string `json:"algorithm" toml:"algorithm"`
}

func (*QuantumCompression) Challenge

func (c *QuantumCompression) Challenge(w io.Writer) error

type QuantumSafeConfig

type QuantumSafeConfig struct {
	Prefix     string       `json:"prefix" toml:"prefix"`
	Encryption Encryption   `json:"encryption" toml:"encryption"`
	Backends   []ZdbBackend `json:"backends" toml:"backends"`
}

func (*QuantumSafeConfig) Challenge

func (m *QuantumSafeConfig) Challenge(w io.Writer) error

type QuantumSafeFS

type QuantumSafeFS struct {
	Cache  gridtypes.Unit      `json:"cache"`
	Config QuantumSafeFSConfig `json:"config"`
}

func (QuantumSafeFS) Capacity

func (q QuantumSafeFS) Capacity() (gridtypes.Capacity, error)

func (QuantumSafeFS) Challenge

func (q QuantumSafeFS) Challenge(w io.Writer) error

func (QuantumSafeFS) Valid

func (q QuantumSafeFS) Valid(getter gridtypes.WorkloadGetter) error

type QuantumSafeFSConfig

type QuantumSafeFSConfig struct {
	MinimalShards     uint32             `json:"minimal_shards" toml:"minimal_shards"`
	ExpectedShards    uint32             `json:"expected_shards" toml:"expected_shards"`
	RedundantGroups   uint32             `json:"redundant_groups" toml:"redundant_groups"`
	RedundantNodes    uint32             `json:"redundant_nodes" toml:"redundant_nodes"`
	MaxZDBDataDirSize uint32             `json:"max_zdb_data_dir_size" toml:"max_zdb_data_dir_size"`
	Encryption        Encryption         `json:"encryption" toml:"encryption"`
	Meta              QuantumSafeMeta    `json:"meta" toml:"meta"`
	Groups            []ZdbGroup         `json:"groups" toml:"groups"`
	Compression       QuantumCompression `json:"compression" toml:"compression"`
}

func (*QuantumSafeFSConfig) Challenge

func (c *QuantumSafeFSConfig) Challenge(w io.Writer) error

type QuantumSafeMeta

type QuantumSafeMeta struct {
	Type   string            `json:"type" toml:"type"`
	Config QuantumSafeConfig `json:"config" toml:"config"`
}

TODO: fix challenge (and validation?)

func (*QuantumSafeMeta) Challenge

func (m *QuantumSafeMeta) Challenge(w io.Writer) error

type QuatumSafeFSResult

type QuatumSafeFSResult struct {
	Path            string `json:"path"`
	MetricsEndpoint string `json:"metrics_endpoint"`
}

type Volume

type Volume struct {
	Size gridtypes.Unit `json:"size"`
}

func (Volume) Capacity

func (v Volume) Capacity() (gridtypes.Capacity, error)

func (Volume) Challenge

func (v Volume) Challenge(w io.Writer) error

func (Volume) Valid

func (v Volume) Valid(getter gridtypes.WorkloadGetter) error

type VolumeResult

type VolumeResult struct {
	ID string `json:"id"`
}

type ZDB

type ZDB struct {
	Size     gridtypes.Unit `json:"size"`
	Mode     ZDBMode        `json:"mode"`
	Password string         `json:"password"`
	Public   bool           `json:"public"`
}

ZDB namespace creation info

func (ZDB) Capacity

func (z ZDB) Capacity() (cap gridtypes.Capacity, err error)

Capacity implements WorkloadData

func (ZDB) Challenge

func (z ZDB) Challenge(b io.Writer) error

Challenge implementation

func (ZDB) Valid

func (z ZDB) Valid(getter gridtypes.WorkloadGetter) error

Valid implementation

type ZDBMode

type ZDBMode string

ZDBMode is the enumeration of the modes 0-db can operate in

func (ZDBMode) String

func (m ZDBMode) String() string

func (ZDBMode) Valid

func (m ZDBMode) Valid() error

Valid validates the mode

type ZDBResult

type ZDBResult struct {
	Namespace string
	IPs       []string
	Port      uint
}

ZDBResult is the information return to the BCDB after deploying a 0-db namespace

type ZLogs

type ZLogs struct {
	// ZMachine stream logs for which zmachine
	ZMachine gridtypes.Name `json:"zmachine"`
	// Output url
	Output string `json:"output"`
}

func (ZLogs) Capacity

func (z ZLogs) Capacity() (gridtypes.Capacity, error)

func (ZLogs) Challenge

func (z ZLogs) Challenge(w io.Writer) error

func (ZLogs) Valid

func (z ZLogs) Valid(getter gridtypes.WorkloadGetter) error

type ZMachine

type ZMachine struct {
	// Flist of the zmachine, must be a valid url to an flist.
	FList string `json:"flist"`
	// Network configuration for machine network
	Network MachineNetwork `json:"network"`
	// Size of zmachine disk
	Size gridtypes.Unit `json:"size"`
	// ComputeCapacity configuration for machine cpu+memory
	ComputeCapacity MachineCapacity `json:"compute_capacity"`
	// Mounts configure mounts/disks attachments to this machine
	Mounts []MachineMount `json:"mounts"`

	// Entrypoint entrypoint of the container, if not set the configured one from the flist
	// is going to be used
	Entrypoint string `json:"entrypoint"`
	// Env variables available for a container
	Env map[string]string `json:"env"`
	// Corex works in container mode which forces replace the
	// entrypoing of the container to use `corex`
	Corex bool `json:"corex"`

	// GPU attached to the VM
	// the list of the GPUs ids must:
	// - Exist, obviously
	// - Not used by other VMs
	// - Only possible on `dedicated` nodes
	GPU []GPU `json:"gpu,omitempty"`
}

ZMachine reservation data

func (ZMachine) Capacity

func (v ZMachine) Capacity() (gridtypes.Capacity, error)

Capacity implementation

func (ZMachine) Challenge

func (v ZMachine) Challenge(b io.Writer) error

Challenge creates signature challenge

func (*ZMachine) MinRootSize

func (m *ZMachine) MinRootSize() gridtypes.Unit

func (*ZMachine) RootSize

func (m *ZMachine) RootSize() gridtypes.Unit

func (ZMachine) Valid

func (v ZMachine) Valid(getter gridtypes.WorkloadGetter) error

Valid implementation

type ZMachineLight

type ZMachineLight struct {
	// Flist of the zmachine, must be a valid url to an flist.
	FList string `json:"flist"`
	// Network configuration for machine network
	Network MachineNetworkLight `json:"network"`
	// Size of zmachine disk
	Size gridtypes.Unit `json:"size"`
	// ComputeCapacity configuration for machine cpu+memory
	ComputeCapacity MachineCapacity `json:"compute_capacity"`
	// Mounts configure mounts/disks attachments to this machine
	Mounts []MachineMount `json:"mounts"`

	// Entrypoint entrypoint of the container, if not set the configured one from the flist
	// is going to be used
	Entrypoint string `json:"entrypoint"`
	// Env variables available for a container
	Env map[string]string `json:"env"`
	// Corex works in container mode which forces replace the
	// entrypoing of the container to use `corex`
	Corex bool `json:"corex"`

	// GPU attached to the VM
	// the list of the GPUs ids must:
	// - Exist, obviously
	// - Not used by other VMs
	// - Only possible on `dedicated` nodes
	GPU []GPU `json:"gpu,omitempty"`
}

ZMachineLight reservation data

func (ZMachineLight) Capacity

func (v ZMachineLight) Capacity() (gridtypes.Capacity, error)

Capacity implementation

func (ZMachineLight) Challenge

func (v ZMachineLight) Challenge(b io.Writer) error

Challenge creates signature challenge

func (*ZMachineLight) MinRootSize

func (m *ZMachineLight) MinRootSize() gridtypes.Unit

func (*ZMachineLight) RootSize

func (m *ZMachineLight) RootSize() gridtypes.Unit

func (ZMachineLight) Valid

func (v ZMachineLight) Valid(getter gridtypes.WorkloadGetter) error

Valid implementation

type ZMachineLightResult

type ZMachineLightResult struct {
	ID         string `json:"id"`
	IP         string `json:"ip"`
	MyceliumIP string `json:"mycelium_ip"`
	ConsoleURL string `json:"console_url"`
}

ZMachineLightResult result returned by VM reservation

type ZMachineResult

type ZMachineResult struct {
	ID          string `json:"id"`
	IP          string `json:"ip"`
	PlanetaryIP string `json:"planetary_ip"`
	MyceliumIP  string `json:"mycelium_ip"`
	ConsoleURL  string `json:"console_url"`
}

ZMachineResult result returned by VM reservation

func (*ZMachineResult) UnmarshalJSON

func (r *ZMachineResult) UnmarshalJSON(data []byte) error

type ZMount

type ZMount struct {
	// Size of the volume
	Size gridtypes.Unit `json:"size"`
}

ZMount defines a mount point

func (ZMount) Capacity

func (v ZMount) Capacity() (gridtypes.Capacity, error)

Capacity implements WorkloadData

func (ZMount) Challenge

func (v ZMount) Challenge(w io.Writer) error

Challenge implements WorkloadData

func (ZMount) Valid

func (v ZMount) Valid(getter gridtypes.WorkloadGetter) error

Valid implements WorkloadData

type ZMountResult

type ZMountResult struct {
	ID string `json:"volume_id"`
}

ZMountResult is the information return to the BCDB after deploying a volume

type ZdbBackend

type ZdbBackend struct {
	Address   string `json:"address" toml:"address"`
	Namespace string `json:"namespace" toml:"namespace"`
	Password  string `json:"password" toml:"password"`
}

func (*ZdbBackend) Challenge

func (z *ZdbBackend) Challenge(w io.Writer) error

type ZdbGroup

type ZdbGroup struct {
	Backends []ZdbBackend `json:"backends" toml:"backends"`
}

func (*ZdbGroup) Challenge

func (z *ZdbGroup) Challenge(w io.Writer) error

Jump to

Keyboard shortcuts

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