Documentation ¶
Index ¶
- type AccessPoint
- type CapacityReservationBuilder
- func (r *CapacityReservationBuilder) Build() types.Reservation
- func (r *CapacityReservationBuilder) Save(writer io.Writer) error
- func (r *CapacityReservationBuilder) WithCUs(cus uint64) *CapacityReservationBuilder
- func (r *CapacityReservationBuilder) WithCurrencies(currencies []string) *CapacityReservationBuilder
- func (r *CapacityReservationBuilder) WithCustomerSignature(customerSignature string) *CapacityReservationBuilder
- func (r *CapacityReservationBuilder) WithCustomerTID(customerTid int64) *CapacityReservationBuilder
- func (r *CapacityReservationBuilder) WithNodeIDs(nodeIDs []string) *CapacityReservationBuilder
- func (r *CapacityReservationBuilder) WithPoolID(poolID int64) *CapacityReservationBuilder
- func (r *CapacityReservationBuilder) WithSUs(sus uint64) *CapacityReservationBuilder
- type ContainerBuilder
- func (c *ContainerBuilder) Build() (workloads.Container, error)
- func (c *ContainerBuilder) Save(writer io.Writer) error
- func (c *ContainerBuilder) WithContainerCapacity(cap workloads.ContainerCapacity) *ContainerBuilder
- func (c *ContainerBuilder) WithEntrypoint(entrypoint string) *ContainerBuilder
- func (c *ContainerBuilder) WithEnvs(envs map[string]string) *ContainerBuilder
- func (c *ContainerBuilder) WithFlist(flist string) *ContainerBuilder
- func (c *ContainerBuilder) WithHubURL(url string) *ContainerBuilder
- func (c *ContainerBuilder) WithInteractive(interactive bool) *ContainerBuilder
- func (c *ContainerBuilder) WithLogs(logs []workloads.Logs) *ContainerBuilder
- func (c *ContainerBuilder) WithNetwork(connections []workloads.NetworkConnection) *ContainerBuilder
- func (c *ContainerBuilder) WithNodeID(nodeID string) *ContainerBuilder
- func (c *ContainerBuilder) WithPoolID(poolID int64) *ContainerBuilder
- func (c *ContainerBuilder) WithSecretEnvs(envs map[string]string) *ContainerBuilder
- func (c *ContainerBuilder) WithStats(stats []workloads.Stats) *ContainerBuilder
- func (c *ContainerBuilder) WithVolumes(mounts []workloads.ContainerMount) *ContainerBuilder
- type K8sBuilder
- func (k8s *K8sBuilder) Build() workloads.K8S
- func (k8s *K8sBuilder) Save(writer io.Writer) error
- func (k8s *K8sBuilder) WithClusterSecret(secret string) *K8sBuilder
- func (k8s *K8sBuilder) WithIPAddress(ip net.IP) *K8sBuilder
- func (k8s *K8sBuilder) WithMasterIPs(ips []net.IP) *K8sBuilder
- func (k8s *K8sBuilder) WithNetworkID(id string) *K8sBuilder
- func (k8s *K8sBuilder) WithNodeID(nodeID string) *K8sBuilder
- func (k8s *K8sBuilder) WithPoolID(poolID int64) *K8sBuilder
- func (k8s *K8sBuilder) WithSSHKeys(sshKeys []string) *K8sBuilder
- func (k8s *K8sBuilder) WithSize(size int64) *K8sBuilder
- func (k8s *K8sBuilder) WithStatsAggregator(aggregators []workloads.StatsAggregator) *K8sBuilder
- type NetResource
- type NetworkBuilder
- func (n *NetworkBuilder) AddAccess(nodeID string, subnet schema.IPRange, wgPubKey string, ip4 bool) (*NetworkBuilder, string, error)
- func (n *NetworkBuilder) AddNode(nodeID string, subnet string, port uint, forceHidden bool) (*NetworkBuilder, error)
- func (n *NetworkBuilder) Build() []workloads.NetworkResource
- func (n *NetworkBuilder) NetworkGraph(w io.Writer) error
- func (n *NetworkBuilder) RemoveNode(schema string, nodeID string) error
- func (n *NetworkBuilder) Save(writer io.Writer) error
- func (n *NetworkBuilder) WithIPRange(ipRange schema.IPRange) *NetworkBuilder
- func (n *NetworkBuilder) WithName(name string) *NetworkBuilder
- type VolumeBuilder
- func (v *VolumeBuilder) Build() workloads.Volume
- func (v *VolumeBuilder) Save(writer io.Writer) error
- func (v *VolumeBuilder) WithNodeID(nodeID string) *VolumeBuilder
- func (v *VolumeBuilder) WithPoolID(poolID int64) *VolumeBuilder
- func (v *VolumeBuilder) WithSize(size int64) *VolumeBuilder
- func (v *VolumeBuilder) WithType(diskType workloads.VolumeTypeEnum) *VolumeBuilder
- type ZDBBuilder
- func (z *ZDBBuilder) Build() (workloads.ZDB, error)
- func (z *ZDBBuilder) Save(writer io.Writer) error
- func (z *ZDBBuilder) WithDiskType(diskType workloads.DiskTypeEnum) *ZDBBuilder
- func (z *ZDBBuilder) WithMode(mode workloads.ZDBModeEnum) *ZDBBuilder
- func (z *ZDBBuilder) WithNodeID(nodeID string) *ZDBBuilder
- func (z *ZDBBuilder) WithPassword(password string) *ZDBBuilder
- func (z *ZDBBuilder) WithPoolID(poolID int64) *ZDBBuilder
- func (z *ZDBBuilder) WithPublic(public bool) *ZDBBuilder
- func (z *ZDBBuilder) WithSize(size int64) *ZDBBuilder
- func (z *ZDBBuilder) WithStatsAggregator(aggregators []workloads.StatsAggregator) *ZDBBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessPoint ¶
type AccessPoint struct { // NodeID of the access point in the network NodeID string `json:"node_id"` // Subnet to be routed through this access point Subnet schema.IPRange `json:"subnet"` WGPublicKey string `json:"wg_public_key"` IP4 bool `json:"ip4"` }
AccessPoint info for a network, defining a node which will act as the AP, and the subnet which will be routed through it
type CapacityReservationBuilder ¶
type CapacityReservationBuilder struct {
// contains filtered or unexported fields
}
CapacityReservationBuilder is a struct that can build reservations
func LoadCapacityReservationBuilder ¶
func LoadCapacityReservationBuilder(reader io.Reader) (*CapacityReservationBuilder, error)
LoadCapacityReservationBuilder loads a reservation builder based on a file path
func NewCapacityReservationBuilder ¶
func NewCapacityReservationBuilder() *CapacityReservationBuilder
NewCapacityReservationBuilder creates a new CapacityReservationBuilder
func (*CapacityReservationBuilder) Build ¶
func (r *CapacityReservationBuilder) Build() types.Reservation
Build returns the reservation
func (*CapacityReservationBuilder) Save ¶
func (r *CapacityReservationBuilder) Save(writer io.Writer) error
Save saves the reservation builder to an IO.Writer
func (*CapacityReservationBuilder) WithCUs ¶
func (r *CapacityReservationBuilder) WithCUs(cus uint64) *CapacityReservationBuilder
WithCUs sets the cus to the reservation
func (*CapacityReservationBuilder) WithCurrencies ¶
func (r *CapacityReservationBuilder) WithCurrencies(currencies []string) *CapacityReservationBuilder
WithCurrencies sets the currencies to the reservation
func (*CapacityReservationBuilder) WithCustomerSignature ¶
func (r *CapacityReservationBuilder) WithCustomerSignature(customerSignature string) *CapacityReservationBuilder
WithCustomerSignature sets the customer signature to the reservation
func (*CapacityReservationBuilder) WithCustomerTID ¶
func (r *CapacityReservationBuilder) WithCustomerTID(customerTid int64) *CapacityReservationBuilder
WithCustomerTID sets the customer signature to the reservation
func (*CapacityReservationBuilder) WithNodeIDs ¶
func (r *CapacityReservationBuilder) WithNodeIDs(nodeIDs []string) *CapacityReservationBuilder
WithNodeIDs sets the node ids to the reservation
func (*CapacityReservationBuilder) WithPoolID ¶
func (r *CapacityReservationBuilder) WithPoolID(poolID int64) *CapacityReservationBuilder
WithPoolID sets the customer signature to the reservation
func (*CapacityReservationBuilder) WithSUs ¶
func (r *CapacityReservationBuilder) WithSUs(sus uint64) *CapacityReservationBuilder
WithSUs sets the cus to the reservation
type ContainerBuilder ¶
ContainerBuilder is a struct that can build containers
func LoadContainerBuilder ¶
func LoadContainerBuilder(reader io.Reader) (*ContainerBuilder, error)
LoadContainerBuilder loads a container builder based on a file path
func NewContainerBuilder ¶
func NewContainerBuilder(nodeID, flist string, network []workloads.NetworkConnection) *ContainerBuilder
NewContainerBuilder creates a new container builder
func (*ContainerBuilder) Build ¶
func (c *ContainerBuilder) Build() (workloads.Container, error)
Build validates and encrypts the secret environment of the container
func (*ContainerBuilder) Save ¶
func (c *ContainerBuilder) Save(writer io.Writer) error
Save saves the container builder to an IO.Writer
func (*ContainerBuilder) WithContainerCapacity ¶
func (c *ContainerBuilder) WithContainerCapacity(cap workloads.ContainerCapacity) *ContainerBuilder
WithContainerCapacity sets the container capacity to the container
func (*ContainerBuilder) WithEntrypoint ¶
func (c *ContainerBuilder) WithEntrypoint(entrypoint string) *ContainerBuilder
WithEntrypoint sets the entrypoint to the container
func (*ContainerBuilder) WithEnvs ¶
func (c *ContainerBuilder) WithEnvs(envs map[string]string) *ContainerBuilder
WithEnvs sets the environments to the container
func (*ContainerBuilder) WithFlist ¶
func (c *ContainerBuilder) WithFlist(flist string) *ContainerBuilder
WithFlist sets the flist to the container
func (*ContainerBuilder) WithHubURL ¶
func (c *ContainerBuilder) WithHubURL(url string) *ContainerBuilder
WithHubURL sets the hub url to the container
func (*ContainerBuilder) WithInteractive ¶
func (c *ContainerBuilder) WithInteractive(interactive bool) *ContainerBuilder
WithInteractive sets the interactive flag to the container
func (*ContainerBuilder) WithLogs ¶
func (c *ContainerBuilder) WithLogs(logs []workloads.Logs) *ContainerBuilder
WithLogs sets the logs to the container
func (*ContainerBuilder) WithNetwork ¶
func (c *ContainerBuilder) WithNetwork(connections []workloads.NetworkConnection) *ContainerBuilder
WithNetwork sets the networks to the container
func (*ContainerBuilder) WithNodeID ¶
func (c *ContainerBuilder) WithNodeID(nodeID string) *ContainerBuilder
WithNodeID sets the node ID to the container
func (*ContainerBuilder) WithPoolID ¶
func (c *ContainerBuilder) WithPoolID(poolID int64) *ContainerBuilder
WithPoolID sets the poolID to the container
func (*ContainerBuilder) WithSecretEnvs ¶
func (c *ContainerBuilder) WithSecretEnvs(envs map[string]string) *ContainerBuilder
WithSecretEnvs sets the secret environments to the container
func (*ContainerBuilder) WithStats ¶ added in v0.4.2
func (c *ContainerBuilder) WithStats(stats []workloads.Stats) *ContainerBuilder
WithStats sets the stats aggregators to the container
func (*ContainerBuilder) WithVolumes ¶
func (c *ContainerBuilder) WithVolumes(mounts []workloads.ContainerMount) *ContainerBuilder
WithVolumes sets the volumes to the container
type K8sBuilder ¶
K8sBuilder is a struct that can build K8S's
func LoadK8sBuilder ¶
func LoadK8sBuilder(reader io.Reader) (*K8sBuilder, error)
LoadK8sBuilder loads a k8s builder based on a file path
func NewK8sBuilder ¶
func NewK8sBuilder(nodeID, networkID, secret string, size int64, IP net.IP) *K8sBuilder
NewK8sBuilder creates a new K8S builder
func (*K8sBuilder) Build ¶
func (k8s *K8sBuilder) Build() workloads.K8S
Build returns the kubernetes
func (*K8sBuilder) Save ¶
func (k8s *K8sBuilder) Save(writer io.Writer) error
Save saves the K8S builder to an IO.Writer
func (*K8sBuilder) WithClusterSecret ¶
func (k8s *K8sBuilder) WithClusterSecret(secret string) *K8sBuilder
WithClusterSecret sets the cluster secret to the K8S
func (*K8sBuilder) WithIPAddress ¶
func (k8s *K8sBuilder) WithIPAddress(ip net.IP) *K8sBuilder
WithIPAddress sets the ip address to the K8S
func (*K8sBuilder) WithMasterIPs ¶
func (k8s *K8sBuilder) WithMasterIPs(ips []net.IP) *K8sBuilder
WithMasterIPs sets the master IPs to the K8S
func (*K8sBuilder) WithNetworkID ¶
func (k8s *K8sBuilder) WithNetworkID(id string) *K8sBuilder
WithNetworkID sets the network id to the K8S
func (*K8sBuilder) WithNodeID ¶
func (k8s *K8sBuilder) WithNodeID(nodeID string) *K8sBuilder
WithNodeID sets the node ID to the K8S
func (*K8sBuilder) WithPoolID ¶
func (k8s *K8sBuilder) WithPoolID(poolID int64) *K8sBuilder
WithPoolID sets the poolID to the k8s
func (*K8sBuilder) WithSSHKeys ¶
func (k8s *K8sBuilder) WithSSHKeys(sshKeys []string) *K8sBuilder
WithSSHKeys sets the ssh keys to the K8S
func (*K8sBuilder) WithSize ¶
func (k8s *K8sBuilder) WithSize(size int64) *K8sBuilder
WithSize sets the size to the K8S
func (*K8sBuilder) WithStatsAggregator ¶
func (k8s *K8sBuilder) WithStatsAggregator(aggregators []workloads.StatsAggregator) *K8sBuilder
WithStatsAggregator sets the stats aggregators to the K8S
type NetResource ¶
type NetResource struct { workloads.NetworkResource // Public endpoints PubEndpoints []net.IP `json:"pub_endpoints"` }
NetResource is the description of a part of a network local to a specific node
type NetworkBuilder ¶
type NetworkBuilder struct { Name string `json:"name,omitempty"` IPRange schema.IPRange `json:"iprange,omitempty"` AccessPoints []AccessPoint `json:"access_points,omitempty"` // NetResources field override NetResources []NetResource `json:"net_resources,omitempty"` // contains filtered or unexported fields }
NetworkBuilder is a struct that can build networks
func LoadNetworkBuilder ¶
LoadNetworkBuilder loads a network builder based on a file path
func NewNetworkBuilder ¶
func NewNetworkBuilder(name string, iprange schema.IPRange, explorer *client.Client) *NetworkBuilder
NewNetworkBuilder creates a new network builder
func (*NetworkBuilder) AddAccess ¶
func (n *NetworkBuilder) AddAccess(nodeID string, subnet schema.IPRange, wgPubKey string, ip4 bool) (*NetworkBuilder, string, error)
AddAccess adds access to a node in the network the subnet will be routed through the accesspoint of the node
func (*NetworkBuilder) AddNode ¶
func (n *NetworkBuilder) AddNode(nodeID string, subnet string, port uint, forceHidden bool) (*NetworkBuilder, error)
AddNode adds a node to the network the subnet will be added as network resource to the node forceHidden will set no public endpoints to the node
func (*NetworkBuilder) Build ¶
func (n *NetworkBuilder) Build() []workloads.NetworkResource
Build returns the network
func (*NetworkBuilder) NetworkGraph ¶
func (n *NetworkBuilder) NetworkGraph(w io.Writer) error
NetworkGraph creates a networkgraph for a network
func (*NetworkBuilder) RemoveNode ¶
func (n *NetworkBuilder) RemoveNode(schema string, nodeID string) error
RemoveNode removes a node
func (*NetworkBuilder) Save ¶
func (n *NetworkBuilder) Save(writer io.Writer) error
Save saves the network builder to an IO.Writer
func (*NetworkBuilder) WithIPRange ¶
func (n *NetworkBuilder) WithIPRange(ipRange schema.IPRange) *NetworkBuilder
WithIPRange sets the ip range to the network
func (*NetworkBuilder) WithName ¶
func (n *NetworkBuilder) WithName(name string) *NetworkBuilder
WithName sets the name to the network
type VolumeBuilder ¶
VolumeBuilder is a struct that can build volumes
func LoadVolumeBuilder ¶
func LoadVolumeBuilder(reader io.Reader) (*VolumeBuilder, error)
LoadVolumeBuilder loads a volume builder based on a file path
func NewVolumeBuilder ¶
func NewVolumeBuilder(nodeID string, size int64, volumeType workloads.VolumeTypeEnum) *VolumeBuilder
NewVolumeBuilder creates a new volume builder
func (*VolumeBuilder) Build ¶
func (v *VolumeBuilder) Build() workloads.Volume
Build returns the volume
func (*VolumeBuilder) Save ¶
func (v *VolumeBuilder) Save(writer io.Writer) error
Save saves the volume builder to an IO.Writer
func (*VolumeBuilder) WithNodeID ¶
func (v *VolumeBuilder) WithNodeID(nodeID string) *VolumeBuilder
WithNodeID sets the node ID to the volume
func (*VolumeBuilder) WithPoolID ¶
func (v *VolumeBuilder) WithPoolID(poolID int64) *VolumeBuilder
WithPoolID sets the poolID to the volume
func (*VolumeBuilder) WithSize ¶
func (v *VolumeBuilder) WithSize(size int64) *VolumeBuilder
WithSize sets the volume size
func (*VolumeBuilder) WithType ¶
func (v *VolumeBuilder) WithType(diskType workloads.VolumeTypeEnum) *VolumeBuilder
WithType sets the volume type
type ZDBBuilder ¶
ZDBBuilder is a struct that can build ZDB's
func LoadZdbBuilder ¶
func LoadZdbBuilder(reader io.Reader) (*ZDBBuilder, error)
LoadZdbBuilder loads a zdb builder based on a file path
func NewZdbBuilder ¶
func NewZdbBuilder(nodeID string, size int64, mode workloads.ZDBModeEnum, diskType workloads.DiskTypeEnum) *ZDBBuilder
NewZdbBuilder creates a new zdb builder and initializes some default values
func (*ZDBBuilder) Build ¶
func (z *ZDBBuilder) Build() (workloads.ZDB, error)
Build validates and encrypts the zdb secret
func (*ZDBBuilder) Save ¶
func (z *ZDBBuilder) Save(writer io.Writer) error
Save saves the zdb builder to an IO.Writer
func (*ZDBBuilder) WithDiskType ¶
func (z *ZDBBuilder) WithDiskType(diskType workloads.DiskTypeEnum) *ZDBBuilder
WithDiskType sets the disktype to the zdb
func (*ZDBBuilder) WithMode ¶
func (z *ZDBBuilder) WithMode(mode workloads.ZDBModeEnum) *ZDBBuilder
WithMode sets the mode to the zdb
func (*ZDBBuilder) WithNodeID ¶
func (z *ZDBBuilder) WithNodeID(nodeID string) *ZDBBuilder
WithNodeID sets the node ID to the zdb
func (*ZDBBuilder) WithPassword ¶
func (z *ZDBBuilder) WithPassword(password string) *ZDBBuilder
WithPassword sets the password to the zdb
func (*ZDBBuilder) WithPoolID ¶
func (z *ZDBBuilder) WithPoolID(poolID int64) *ZDBBuilder
WithPoolID sets the poolID to the zdb
func (*ZDBBuilder) WithPublic ¶
func (z *ZDBBuilder) WithPublic(public bool) *ZDBBuilder
WithPublic sets if public to the zdb
func (*ZDBBuilder) WithSize ¶
func (z *ZDBBuilder) WithSize(size int64) *ZDBBuilder
WithSize sets the size on the zdb
func (*ZDBBuilder) WithStatsAggregator ¶
func (z *ZDBBuilder) WithStatsAggregator(aggregators []workloads.StatsAggregator) *ZDBBuilder
WithStatsAggregator sets the stats aggregators to the zdb