networks

package
v0.0.0-...-82ab749 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdminFilename = "substrate.admin-networks.json"
	Filename      = "substrate.networks.json"
)
View Source
const NATGatewaysFilename = "substrate.nat-gateways"

Variables

This section is empty.

Functions

func ShareVPC

func ShareVPC(
	ctx context.Context,
	accountCfg, networkCfg *awscfg.Config,
	domain, environment, quality string,
	region string,
)

Types

type Document

type Document struct {
	Admonition           jsonutil.Admonition `json:"#"`
	IPv4SubnetMaskLength int                 // must be in range [16, 24]
	Networks             []*Network
	RFC1918              cidr.IPv4
	SubstrateVersion     jsonutil.SubstrateVersion
	// contains filtered or unexported fields
}

func ReadDocument

func ReadDocument(filename string, rfc1918 cidr.IPv4, subnetMaskLength int) (*Document, error)

func (*Document) Ensure

func (d *Document) Ensure(n0 *Network) (*Network, error)

func (*Document) Find

func (d *Document) Find(n0 *Network) *Network

func (*Document) FindAll

func (d *Document) FindAll(n0 *Network) (nets []*Network)

func (*Document) Len

func (d *Document) Len() int

func (*Document) Less

func (d *Document) Less(i, j int) bool

func (*Document) Swap

func (d *Document) Swap(i, j int)

func (*Document) Write

func (d *Document) Write() error

type Network

type Network struct {
	Region                        string
	Environment, Quality, Special string `json:",omitempty"`
	IPv4                          cidr.IPv4
	IPv6                          string `json:",omitempty"`
	VPC                           string `json:",omitempty"`
}

func (*Network) String

func (n *Network) String() string

type PeeringConnections

type PeeringConnections struct {
	// contains filtered or unexported fields
}

PeeringConnections ensures we don't duplicate the work of constructing VPC peering connections between two quality-region pairs in an environment.

func EnumeratePeeringConnections

func EnumeratePeeringConnections() (*PeeringConnections, error)

func (*PeeringConnections) Add

func (pcs *PeeringConnections) Add(eq0, eq1 veqp.EnvironmentQualityPair, region0, region1 string)

func (*PeeringConnections) Has

func (pcs *PeeringConnections) Has(eq0, eq1 veqp.EnvironmentQualityPair, region0, region1 string) bool

func (*PeeringConnections) Slice

func (pcs *PeeringConnections) Slice() []peeringConnection

Jump to

Keyboard shortcuts

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