Documentation
¶
Index ¶
- type Backend
- type Config
- type MTUConfig
- type Mapping
- type ModuleHandle
- type NAT64Config
- type NAT64Module
- type NAT64Service
- func (m *NAT64Service) AddMapping(ctx context.Context, req *nat64pb.AddMappingRequest) (*nat64pb.AddMappingResponse, error)
- func (m *NAT64Service) AddPrefix(ctx context.Context, req *nat64pb.AddPrefixRequest) (*nat64pb.AddPrefixResponse, error)
- func (m *NAT64Service) DeleteConfig(ctx context.Context, req *nat64pb.DeleteConfigRequest) (*nat64pb.DeleteConfigResponse, error)
- func (m *NAT64Service) ListConfigs(ctx context.Context, req *nat64pb.ListConfigsRequest) (*nat64pb.ListConfigsResponse, error)
- func (m *NAT64Service) RemoveMapping(ctx context.Context, req *nat64pb.RemoveMappingRequest) (*nat64pb.RemoveMappingResponse, error)
- func (m *NAT64Service) RemovePrefix(ctx context.Context, req *nat64pb.RemovePrefixRequest) (*nat64pb.RemovePrefixResponse, error)
- func (m *NAT64Service) SetDropUnknown(ctx context.Context, req *nat64pb.SetDropUnknownRequest) (*nat64pb.SetDropUnknownResponse, error)
- func (m *NAT64Service) SetMTU(ctx context.Context, req *nat64pb.SetMTURequest) (*nat64pb.SetMTUResponse, error)
- func (m *NAT64Service) ShowConfig(ctx context.Context, req *nat64pb.ShowConfigRequest) (*nat64pb.ShowConfigResponse, error)
- type NAT64ServiceOption
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
UpdateModule(name string, config *NAT64Config) (ModuleHandle, error)
// DeleteModule removes a module config.
DeleteModule(name string) error
}
func NewBackend ¶
type Config ¶
type Config struct {
ffi.AttachConfig `yaml:",inline"`
// Endpoint is the gRPC endpoint address
Endpoint xcfg.NonEmptyString `yaml:"endpoint"`
}
Config represents NAT64 module configuration
type ModuleHandle ¶
type ModuleHandle interface {
Free() error
}
type NAT64Config ¶
type NAT64Config struct {
Prefixes [][]byte
Mappings []Mapping
MTU MTUConfig
DropUnknownPrefix bool
DropUnknownMapping bool
}
NAT64Config represents the configuration for a NAT64 instance
func (NAT64Config) Clone ¶
func (m NAT64Config) Clone() NAT64Config
type NAT64Module ¶
type NAT64Module struct {
// contains filtered or unexported fields
}
NAT64Module is a control-plane component responsible for NAT64 translation
func NewNAT64Module ¶
func NewNAT64Module(cfg *Config, options ...Option) (*NAT64Module, error)
NewNAT64Module creates a new NAT64 module instance
func (*NAT64Module) Close ¶
func (m *NAT64Module) Close() error
Close closes the module and releases all resources
func (*NAT64Module) Endpoint ¶
func (m *NAT64Module) Endpoint() string
func (*NAT64Module) Name ¶
func (m *NAT64Module) Name() string
func (*NAT64Module) RegisterService ¶
func (m *NAT64Module) RegisterService(server *grpc.Server)
func (*NAT64Module) ServicesNames ¶
func (m *NAT64Module) ServicesNames() []string
type NAT64Service ¶
type NAT64Service struct {
nat64pb.UnimplementedNAT64ServiceServer
// contains filtered or unexported fields
}
NAT64Service implements the NAT64 gRPC service
func NewNAT64Service ¶
func NewNAT64Service(backend Backend, options ...NAT64ServiceOption) *NAT64Service
func (*NAT64Service) AddMapping ¶
func (m *NAT64Service) AddMapping(ctx context.Context, req *nat64pb.AddMappingRequest) (*nat64pb.AddMappingResponse, error)
func (*NAT64Service) AddPrefix ¶
func (m *NAT64Service) AddPrefix(ctx context.Context, req *nat64pb.AddPrefixRequest) (*nat64pb.AddPrefixResponse, error)
func (*NAT64Service) DeleteConfig ¶
func (m *NAT64Service) DeleteConfig(ctx context.Context, req *nat64pb.DeleteConfigRequest) (*nat64pb.DeleteConfigResponse, error)
DeleteConfig removes the named config when it is no longer referenced by any pipeline.
func (*NAT64Service) ListConfigs ¶
func (m *NAT64Service) ListConfigs(ctx context.Context, req *nat64pb.ListConfigsRequest) (*nat64pb.ListConfigsResponse, error)
func (*NAT64Service) RemoveMapping ¶
func (m *NAT64Service) RemoveMapping(ctx context.Context, req *nat64pb.RemoveMappingRequest) (*nat64pb.RemoveMappingResponse, error)
func (*NAT64Service) RemovePrefix ¶
func (m *NAT64Service) RemovePrefix(ctx context.Context, req *nat64pb.RemovePrefixRequest) (*nat64pb.RemovePrefixResponse, error)
func (*NAT64Service) SetDropUnknown ¶
func (m *NAT64Service) SetDropUnknown(ctx context.Context, req *nat64pb.SetDropUnknownRequest) (*nat64pb.SetDropUnknownResponse, error)
func (*NAT64Service) SetMTU ¶
func (m *NAT64Service) SetMTU(ctx context.Context, req *nat64pb.SetMTURequest) (*nat64pb.SetMTUResponse, error)
func (*NAT64Service) ShowConfig ¶
func (m *NAT64Service) ShowConfig(ctx context.Context, req *nat64pb.ShowConfigRequest) (*nat64pb.ShowConfigResponse, error)
type NAT64ServiceOption ¶
type NAT64ServiceOption func(*nat64ServiceOptions)
NAT64ServiceOption configures the NAT64Service constructor.
func WithNAT64ServiceLog ¶
func WithNAT64ServiceLog(log *zap.Logger) NAT64ServiceOption
WithNAT64ServiceLog sets the logger for the NAT64Service.