cloudtypes

package
v2.2.0-pre Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinPort = 0
	MaxPort = 65535
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Firewall

type Firewall []FirewallRule

Firewall contains all firewall rules to be applied for either ingress or egress.

func (Firewall) AWS

func (f Firewall) AWS() []ec2types.IpPermission

func (Firewall) Azure

func (f Firewall) Azure() ([]*armnetwork.SecurityRule, error)

func (Firewall) GCP

func (f Firewall) GCP() ([]*computepb.Firewall, error)

type FirewallRule

type FirewallRule struct {
	Name        string
	Description string
	Protocol    string
	IPRange     string
	FromPort    int
	ToPort      int
}

FirewallRule holds a single firewall rule.

type Instance

type Instance struct {
	PublicIP  string
	PrivateIP string
}

Instance is a gcp instance.

type Instances

type Instances map[string]Instance

Instances is a map of gcp Instances. The ID of an instance is used as key.

func (Instances) GetOne

func (i Instances) GetOne() (string, Instance, error)

GetOne return anyone instance out of the instances and its ID.

func (Instances) GetOthers

func (i Instances) GetOthers(id string) Instances

GetOthers returns all instances but the one with the handed ID.

func (Instances) IDs

func (i Instances) IDs() []string

IDs returns the IDs of all instances of the Constellation.

func (Instances) PrivateIPs

func (i Instances) PrivateIPs() []string

PrivateIPs returns the private IPs of all the instances of the Constellation.

func (Instances) PublicIPs

func (i Instances) PublicIPs() []string

PublicIPs returns the public IPs of all the instances of the Constellation.

type PortOutOfRangeError

type PortOutOfRangeError struct {
	FromPort int
	ToPort   int
}

PortOutOfRangeError occurs when either FromPort or ToPort are out of range of [MinPort-MaxPort].

func (*PortOutOfRangeError) Error

func (p *PortOutOfRangeError) Error() string

type ScalingGroup

type ScalingGroup struct {
	Instances
	GroupID string
}

ScalingGroup is a group of instances, with an identifying group ID.

Jump to

Keyboard shortcuts

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