Documentation
¶
Index ¶
- Constants
- Variables
- func AgentSubnetForRegion(region Region) string
- func GenerateNonOverlappingIPv4Subnet(existingNetworks []*net.IPNet, prefixLen int) (*net.IPNet, *net.IP, error)
- func GenerateServerIPv6FromIPv4(region Region, network Network, tenantID string, ipv4 net.IP) (net.IP, *net.IPNet, error)
- func GenerateUniqueIPv6() (net.IP, error)
- func HadronSubnetForRegion(region Region) string
- func IsAgentuityIPv6Prefix(ip net.IP) bool
- type IPv6Address
- type Network
- type Region
Constants ¶
const AetherServiceIP = "fd15:d710:2d:c580:9dc5:aeeb::"
AetherServiceIP is the IP address for the aether service
const AgentSubnetGLOBAL = "fd15:d710:0040::/44"
AgentSubnetGLOBAL is the subnet for the agent network in the global region
const AgentSubnetUSCentral1 = "fd15:d710:0140::/44"
AgentSubnetUSCentral1 is the subnet for the agent network in the us-central1 region
const AgentSubnetUSEast1 = "fd15:d710:0340::/44"
AgentSubnetUSEast1 is the subnet for the agent network in the us-east1 region
const AgentSubnetUSWest1 = "fd15:d710:0240::/44"
AgentSubnetUSWest1 is the subnet for the agent network in the us-west1 region
const AgentuityIPV6ULAPrefix = "fd15:d710"
this is the agentuity IPV6 ULA prefix
const AgentuityTenantID = "agentuity"
const CatalystServiceIP = "fd15:d710:25:c500:9dc5:d408::"
CatalystServiceIP is the IP address for the catalyst service
const HadronSubnetGLOBAL = "fd15:d710:0030::/44"
HadronSubnetGLOBAL is the subnet for the hadron network in the global region
const HadronSubnetUSCentral1 = "fd15:d710:0130::/44"
HadronSubnetUSCentral1 is the subnet for the hadron network in the us-central1 region
const HadronSubnetUSEast1 = "fd15:d710:0330::/44"
HadronSubnetUSEast1 is the subnet for the hadron network in the us-east1 region
const HadronSubnetUSWest1 = "fd15:d710:0230::/44"
HadronSubnetUSWest1 is the subnet for the hadron network in the us-west1 region
const InternalServiceSubnet = "fd15:d710:0020::/44"
InternalServiceSubnet is the subnet for the internal service network
const OtelServiceIP = "fd15:d710:2a:68d0:9dc5:2763::"
OtelServiceIP is the IP address for the otel service
Variables ¶
var Addresses = map[string]net.IP{ "aether": net.ParseIP(AetherServiceIP), "catalyst": net.ParseIP(CatalystServiceIP), "otel": net.ParseIP(OtelServiceIP), }
Addresses is a map of service names to their IP addresses
var Regions = map[string]Region{ "global": RegionGlobal, "us-central1": RegionUSCentral1, "us-west1": RegionUSWest1, "us-east1": RegionUSEast1, }
Regions maps canonical region strings to Region. Treat as read-only; do not mutate at runtime.
var Services = map[string]string{ AetherServiceIP: "aether", CatalystServiceIP: "catalyst", OtelServiceIP: "otel", }
Services maps IP address strings to service names
Functions ¶
func AgentSubnetForRegion ¶ added in v1.0.77
AgentSubnetForRegion will return the subnet for the agent network in the given region
func GenerateNonOverlappingIPv4Subnet ¶ added in v1.0.76
func GenerateNonOverlappingIPv4Subnet(existingNetworks []*net.IPNet, prefixLen int) (*net.IPNet, *net.IP, error)
GenerateNonOverlappingIPv4Subnet generates a non-overlapping ipv4 subnet with the given prefix size within the given range.
func GenerateServerIPv6FromIPv4 ¶ added in v1.0.76
func GenerateServerIPv6FromIPv4(region Region, network Network, tenantID string, ipv4 net.IP) (net.IP, *net.IPNet, error)
GenerateServerIPv6FromIPv4 generates a predictable IPv6 address by encoding the IPv4 address
func GenerateUniqueIPv6 ¶ added in v1.0.76
GenerateUniqueIPv6 generates a unique IPv6 address with the Agentuity prefix
func HadronSubnetForRegion ¶ added in v1.0.77
HadronSubnetForRegion will return the subnet for the hadron network in the given region
func IsAgentuityIPv6Prefix ¶ added in v1.0.76
IsAgentuityIPv6Prefix checks if the given IP address has the Agentuity prefix
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) IP ¶ added in v1.0.77
func (a *IPv6Address) IP() net.IP
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