network

package
v1.0.68 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const AgentuityTenantID = "agentuity"

Variables

This section is empty.

Functions

This section is empty.

Types

type IPv6Address

type IPv6Address struct {
	// Region is the region of the IPv6 address.
	Region Region
	// Network is the network of the IPv6 address.
	Network Network
	// TenantID is the tenant ID of the IPv6 address.
	TenantID string
	// MachineID is the machine ID of the IPv6 address.
	MachineID string
	// HostID is the host ID of the IPv6 address.
	HostID string
	// contains filtered or unexported fields
}

func NewIPv6Address

func NewIPv6Address(region Region, network Network, tenantID string, machineID string, hostID string) *IPv6Address

NewIPv6Address creates a new IPv6Address struct with the given parameters. It calculates the IPv6 address based on the provided parameters and stores them in the struct. The struct is returned as a pointer to the IPv6Address type.

func (*IPv6Address) MachineSubnet

func (a *IPv6Address) MachineSubnet() string

MachineSubnet returns the subnet for the machine with a /96 mask.

func (*IPv6Address) MarshalJSON

func (a *IPv6Address) MarshalJSON() ([]byte, error)

func (*IPv6Address) String

func (a *IPv6Address) String() string

type Network

type Network uint8
const (
	NetworkPrivateGravity   Network = 0x00
	NetworkExternalCustomer Network = 0x01
)

type Region

type Region uint8
const (
	RegionGlobal     Region = 0x00
	RegionUSCentral1 Region = 0x01
	RegionUSWest1    Region = 0x02
	RegionUSEast1    Region = 0x03
)

Jump to

Keyboard shortcuts

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