apiutil

package
v0.50.4 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAttachedSubnets

func GetAttachedSubnets(ctx context.Context, kube client.Reader, server string) (map[string]ServerAttachment, error)

func GetReachableFrom added in v0.40.2

func GetReachableFrom(ctx context.Context, kube client.Reader, vpcName string) (map[string]*ReachableFromSubnet, error)

func IsExternalAttached added in v0.40.2

func IsExternalAttached(ctx context.Context, kube client.Reader, external string) (bool, error)

func IsExternalIPReachable added in v0.40.2

func IsExternalIPReachable(ctx context.Context, kube client.Reader, source, destIP string) (bool, error)

func IsExternalSubnetReachable

func IsExternalSubnetReachable(ctx context.Context, kube client.Reader, sourceServer, destSubnet string) (bool, error)

TODO check if allowed prefix contains destSubnet

func IsServerReachable

func IsServerReachable(ctx context.Context, kube client.Reader, sourceServer, destServer string) (bool, error)

func IsStaticExternalIPReachable added in v0.40.2

func IsStaticExternalIPReachable(ctx context.Context, kube client.Reader, source, destIP string) (bool, error)

func IsSubnetReachable

func IsSubnetReachable(ctx context.Context, kube client.Reader, source, dest string) (bool, error)

func IsSubnetReachableBetweenVPCs

func IsSubnetReachableBetweenVPCs(ctx context.Context, kube client.Reader, vpc1Name, vpc1Subnet, vpc2Name, vpc2Subnet string) (bool, error)

func IsSubnetReachableWithinVPC

func IsSubnetReachableWithinVPC(ctx context.Context, kube client.Reader, vpcName, source, dest string) (bool, error)

func IsSubnetReachableWithinVPCObj added in v0.40.2

func IsSubnetReachableWithinVPCObj(vpc *vpcapi.VPC, source, dest string) (bool, error)

func IsVPCPeeringRemoteNotEmpty added in v0.40.2

func IsVPCPeeringRemoteNotEmpty(ctx context.Context, kube client.Reader, vpcPeering *vpcapi.VPCPeering) (bool, error)

Types

type ReachableFromSubnet added in v0.40.2

type ReachableFromSubnet struct {
	WithinSameSubnet *ReachableSubnet             `json:"withinSameSubnet,omitempty"`
	SameVPCSubnets   []ReachableSubnet            `json:"sameVPCSubnets,omitempty"`
	OtherVPCSubnets  map[string][]ReachableSubnet `json:"otherVPCSubnets,omitempty"`  // vpc -> []subnets
	ExternalPrefixes map[string][]string          `json:"externalPrefixes,omitempty"` // external -> []prefixes
}

type ReachableSubnet added in v0.40.2

type ReachableSubnet struct {
	Name   string `json:"name,omitempty"`
	Subnet string `json:"subnet,omitempty"`
}

type ServerAttachment

type ServerAttachment struct {
	Connection string
	Interfaces []string
	NativeVLAN bool
}

Jump to

Keyboard shortcuts

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