networking

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package networking provides a portable networking API with cross-cutting concerns.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Networking

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

Networking is the portable networking type wrapping a driver.

func NewNetworking

func NewNetworking(d driver.Networking, opts ...Option) *Networking

func (*Networking) AcceptPeeringConnection added in v1.2.0

func (n *Networking) AcceptPeeringConnection(ctx context.Context, peeringID string) error

AcceptPeeringConnection accepts a pending peering connection.

func (*Networking) AddEgressRule

func (n *Networking) AddEgressRule(ctx context.Context, groupID string, rule driver.SecurityRule) error

func (*Networking) AddIngressRule

func (n *Networking) AddIngressRule(ctx context.Context, groupID string, rule driver.SecurityRule) error

func (*Networking) AddNetworkACLRule added in v1.2.0

func (n *Networking) AddNetworkACLRule(
	ctx context.Context, aclID string, rule *driver.NetworkACLRule,
) error

AddNetworkACLRule adds a rule to a network ACL.

func (*Networking) AllocateAddress added in v1.3.2

func (n *Networking) AllocateAddress(
	ctx context.Context, cfg driver.ElasticIPConfig,
) (*driver.ElasticIP, error)

AllocateAddress allocates a new elastic IP address.

func (*Networking) AssociateAddress added in v1.3.2

func (n *Networking) AssociateAddress(
	ctx context.Context, allocationID, instanceID string,
) (string, error)

AssociateAddress associates an elastic IP with an instance.

func (*Networking) AssociateRouteTable added in v1.3.2

func (n *Networking) AssociateRouteTable(
	ctx context.Context, routeTableID, subnetID string,
) (*driver.RouteTableAssociation, error)

AssociateRouteTable associates a route table with a subnet.

func (*Networking) AttachInternetGateway added in v1.3.2

func (n *Networking) AttachInternetGateway(
	ctx context.Context, igwID, vpcID string,
) error

AttachInternetGateway attaches an internet gateway to a VPC.

func (*Networking) CreateFlowLog added in v1.2.0

func (n *Networking) CreateFlowLog(
	ctx context.Context, config driver.FlowLogConfig,
) (*driver.FlowLog, error)

CreateFlowLog creates a flow log.

func (*Networking) CreateInternetGateway added in v1.3.2

func (n *Networking) CreateInternetGateway(
	ctx context.Context, cfg driver.InternetGatewayConfig,
) (*driver.InternetGateway, error)

CreateInternetGateway creates an internet gateway.

func (*Networking) CreateNATGateway added in v1.2.0

func (n *Networking) CreateNATGateway(
	ctx context.Context, config driver.NATGatewayConfig,
) (*driver.NATGateway, error)

CreateNATGateway creates a NAT gateway.

func (*Networking) CreateNetworkACL added in v1.2.0

func (n *Networking) CreateNetworkACL(
	ctx context.Context, vpcID string, tags map[string]string,
) (*driver.NetworkACL, error)

CreateNetworkACL creates a network ACL.

func (*Networking) CreatePeeringConnection added in v1.2.0

func (n *Networking) CreatePeeringConnection(
	ctx context.Context, config driver.PeeringConfig,
) (*driver.PeeringConnection, error)

CreatePeeringConnection creates a VPC peering connection.

func (*Networking) CreateRoute added in v1.2.0

func (n *Networking) CreateRoute(
	ctx context.Context, routeTableID, destinationCIDR, targetID, targetType string,
) error

CreateRoute adds a route to a route table.

func (*Networking) CreateRouteTable added in v1.2.0

func (n *Networking) CreateRouteTable(
	ctx context.Context, config driver.RouteTableConfig,
) (*driver.RouteTable, error)

CreateRouteTable creates a route table.

func (*Networking) CreateSecurityGroup

func (n *Networking) CreateSecurityGroup(ctx context.Context, config driver.SecurityGroupConfig) (*driver.SecurityGroupInfo, error)

func (*Networking) CreateSubnet

func (n *Networking) CreateSubnet(ctx context.Context, config driver.SubnetConfig) (*driver.SubnetInfo, error)

func (*Networking) CreateVPC

func (n *Networking) CreateVPC(ctx context.Context, config driver.VPCConfig) (*driver.VPCInfo, error)

func (*Networking) CreateVPCEndpoint added in v1.4.0

func (n *Networking) CreateVPCEndpoint(
	ctx context.Context, config driver.VPCEndpointConfig,
) (*driver.VPCEndpoint, error)

CreateVPCEndpoint creates a VPC endpoint.

func (*Networking) DeleteFlowLog added in v1.2.0

func (n *Networking) DeleteFlowLog(ctx context.Context, id string) error

DeleteFlowLog deletes a flow log.

func (*Networking) DeleteInternetGateway added in v1.3.2

func (n *Networking) DeleteInternetGateway(
	ctx context.Context, id string,
) error

DeleteInternetGateway deletes an internet gateway.

func (*Networking) DeleteNATGateway added in v1.2.0

func (n *Networking) DeleteNATGateway(ctx context.Context, id string) error

DeleteNATGateway deletes a NAT gateway.

func (*Networking) DeleteNetworkACL added in v1.2.0

func (n *Networking) DeleteNetworkACL(ctx context.Context, id string) error

DeleteNetworkACL deletes a network ACL.

func (*Networking) DeletePeeringConnection added in v1.2.0

func (n *Networking) DeletePeeringConnection(ctx context.Context, peeringID string) error

DeletePeeringConnection deletes a peering connection.

func (*Networking) DeleteRoute added in v1.2.0

func (n *Networking) DeleteRoute(ctx context.Context, routeTableID, destinationCIDR string) error

DeleteRoute removes a route from a route table.

func (*Networking) DeleteRouteTable added in v1.2.0

func (n *Networking) DeleteRouteTable(ctx context.Context, id string) error

DeleteRouteTable deletes a route table.

func (*Networking) DeleteSecurityGroup

func (n *Networking) DeleteSecurityGroup(ctx context.Context, id string) error

func (*Networking) DeleteSubnet

func (n *Networking) DeleteSubnet(ctx context.Context, id string) error

func (*Networking) DeleteVPC

func (n *Networking) DeleteVPC(ctx context.Context, id string) error

func (*Networking) DeleteVPCEndpoint added in v1.4.0

func (n *Networking) DeleteVPCEndpoint(
	ctx context.Context, id string,
) error

DeleteVPCEndpoint deletes a VPC endpoint.

func (*Networking) DescribeAddresses added in v1.3.2

func (n *Networking) DescribeAddresses(
	ctx context.Context, ids []string,
) ([]driver.ElasticIP, error)

DescribeAddresses returns elastic IPs matching the given IDs.

func (*Networking) DescribeFlowLogs added in v1.2.0

func (n *Networking) DescribeFlowLogs(
	ctx context.Context, ids []string,
) ([]driver.FlowLog, error)

DescribeFlowLogs returns flow logs matching the given IDs.

func (*Networking) DescribeInternetGateways added in v1.3.2

func (n *Networking) DescribeInternetGateways(
	ctx context.Context, ids []string,
) ([]driver.InternetGateway, error)

DescribeInternetGateways returns internet gateways matching the given IDs.

func (*Networking) DescribeNATGateways added in v1.2.0

func (n *Networking) DescribeNATGateways(
	ctx context.Context, ids []string,
) ([]driver.NATGateway, error)

DescribeNATGateways returns NAT gateways matching the given IDs.

func (*Networking) DescribeNetworkACLs added in v1.2.0

func (n *Networking) DescribeNetworkACLs(
	ctx context.Context, ids []string,
) ([]driver.NetworkACL, error)

DescribeNetworkACLs returns network ACLs matching the given IDs.

func (*Networking) DescribePeeringConnections added in v1.2.0

func (n *Networking) DescribePeeringConnections(
	ctx context.Context, ids []string,
) ([]driver.PeeringConnection, error)

DescribePeeringConnections returns peering connections matching the given IDs.

func (*Networking) DescribeRouteTables added in v1.2.0

func (n *Networking) DescribeRouteTables(
	ctx context.Context, ids []string,
) ([]driver.RouteTable, error)

DescribeRouteTables returns route tables matching the given IDs.

func (*Networking) DescribeSecurityGroups

func (n *Networking) DescribeSecurityGroups(ctx context.Context, ids []string) ([]driver.SecurityGroupInfo, error)

func (*Networking) DescribeSubnets

func (n *Networking) DescribeSubnets(ctx context.Context, ids []string) ([]driver.SubnetInfo, error)

func (*Networking) DescribeVPCEndpoints added in v1.4.0

func (n *Networking) DescribeVPCEndpoints(
	ctx context.Context, ids []string,
) ([]driver.VPCEndpoint, error)

DescribeVPCEndpoints returns VPC endpoints matching the given IDs.

func (*Networking) DescribeVPCs

func (n *Networking) DescribeVPCs(ctx context.Context, ids []string) ([]driver.VPCInfo, error)

func (*Networking) DetachInternetGateway added in v1.3.2

func (n *Networking) DetachInternetGateway(
	ctx context.Context, igwID, vpcID string,
) error

DetachInternetGateway detaches an internet gateway from a VPC.

func (*Networking) DisassociateAddress added in v1.3.2

func (n *Networking) DisassociateAddress(
	ctx context.Context, associationID string,
) error

DisassociateAddress removes an elastic IP association.

func (*Networking) DisassociateRouteTable added in v1.3.2

func (n *Networking) DisassociateRouteTable(
	ctx context.Context, associationID string,
) error

DisassociateRouteTable removes a route table association.

func (*Networking) GetFlowLogRecords added in v1.2.0

func (n *Networking) GetFlowLogRecords(
	ctx context.Context, flowLogID string, limit int,
) ([]driver.FlowLogRecord, error)

GetFlowLogRecords returns flow log records for the specified flow log.

func (*Networking) ModifyVPCEndpoint added in v1.4.0

func (n *Networking) ModifyVPCEndpoint(
	ctx context.Context, id string, config driver.VPCEndpointConfig,
) (*driver.VPCEndpoint, error)

ModifyVPCEndpoint modifies a VPC endpoint.

func (*Networking) RejectPeeringConnection added in v1.2.0

func (n *Networking) RejectPeeringConnection(ctx context.Context, peeringID string) error

RejectPeeringConnection rejects a pending peering connection.

func (*Networking) ReleaseAddress added in v1.3.2

func (n *Networking) ReleaseAddress(
	ctx context.Context, allocationID string,
) error

ReleaseAddress releases an elastic IP address.

func (*Networking) RemoveEgressRule

func (n *Networking) RemoveEgressRule(ctx context.Context, groupID string, rule driver.SecurityRule) error

func (*Networking) RemoveIngressRule

func (n *Networking) RemoveIngressRule(ctx context.Context, groupID string, rule driver.SecurityRule) error

func (*Networking) RemoveNetworkACLRule added in v1.2.0

func (n *Networking) RemoveNetworkACLRule(
	ctx context.Context, aclID string, ruleNumber int, egress bool,
) error

RemoveNetworkACLRule removes a rule from a network ACL.

type Option

type Option func(*Networking)

func WithErrorInjection

func WithErrorInjection(i *inject.Injector) Option

func WithLatency

func WithLatency(d time.Duration) Option

func WithMetrics

func WithMetrics(m *metrics.Collector) Option

func WithRateLimiter

func WithRateLimiter(l *ratelimit.Limiter) Option

func WithRecorder

func WithRecorder(r *recorder.Recorder) Option

Directories

Path Synopsis
Package driver defines the interface for networking service implementations.
Package driver defines the interface for networking service implementations.

Jump to

Keyboard shortcuts

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