network

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FromEnd   = "end"
	FromStart = "start"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// CIDR of private network.
	// Default is 10.20.0.0/16
	CIDR string
	// Enabled of not.
	// Default is false.
	Enabled bool
	// Network zone.
	// Default is eu-central.
	Zone string
}

Config can be used to configure hetzner network with given CIDR and zone.

type Deployed

type Deployed struct {
	ID      pulumi.IntOutput
	Subnets map[string]*Subnet
}

type Network

type Network struct {
	Config *Config
	// contains filtered or unexported fields
}

func New

func New(ctx *program.Context, cfg *Config) *Network

func (*Network) GetFree

func (n *Network) GetFree(subnetID string) (string, error)

func (*Network) IPAM

func (n *Network) IPAM() *ipam.IPAM

func (*Network) PickSubnet

func (n *Network) PickSubnet(id string, from string) error

func (*Network) Up

func (n *Network) Up() (*Deployed, error)

func (*Network) WithIPAM

func (n *Network) WithIPAM(ipam *ipam.IPAM) *Network

type Subnet

type Subnet struct {
	Resource *hcloud.NetworkSubnet
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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