networking

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 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) 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) 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) DeleteFlowLog added in v1.2.0

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

DeleteFlowLog deletes a flow log.

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) 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) 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) DescribeVPCs

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

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) RejectPeeringConnection added in v1.2.0

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

RejectPeeringConnection rejects a pending peering connection.

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