nat

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package nat is the Cloud NAT service module (SRS 5.10). Cloud NAT's control plane is part of compute.googleapis.com (routers and their nats[], FR-NAT-001) and is served by the compute module, as is the NAT egress proxy data plane (FR-NAT-002..005), which compute's emu.VPC starts when workloads ask for their NAT egress proxy. This module exists so `--services nat` selects Cloud NAT (pulling in compute through config.Dependencies), so readiness reflects whether a container runtime is available for the data plane, and for the admin API's offline sink switch (admin.go).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(env *emu.Env) emu.Service

New returns the service.

Types

type Service

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

Service is the Cloud NAT service module.

func (*Service) Name

func (s *Service) Name() string

func (*Service) Ready

func (s *Service) Ready() error

Ready reports whether the NAT egress proxy data plane can run: compute must be running and a container runtime reachable. The result is cached for a few seconds.

func (*Service) Register

func (s *Service) Register(r emu.Router) error

func (*Service) Start

func (s *Service) Start(ctx context.Context) error

Start probes the runtime in the background; instance start never fails because of it (the control plane works without a runtime).

func (*Service) Stop

func (s *Service) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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