externalips

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package externalips provides to the context on Request or Close possible to resolve external IP to internal or vise versa

Code generated by "-output string_map.gen.go -type stringMap<string,string> -output string_map.gen.go -type stringMap<string,string>"; DO NOT EDIT.

Index

Constants

View Source
const DefaultFilePath = "/var/lib/networkservicemesh/config/ipmap.yaml"

DefaultFilePath is path to the default file for monitoring IPs

Variables

This section is empty.

Functions

func FromInternal

func FromInternal(ctx context.Context, ip net.IP) net.IP

FromInternal resolves a internal IP to external

func NewServer

func NewServer(chainCtx context.Context, options ...Option) networkservice.NetworkServiceServer

NewServer creates networkservice.NetworkServiceServer which provides to context possible to resolve internal IP to external or vise versa. By default watches file by DefaultFilePath.

func ToInternal

func ToInternal(ctx context.Context, ip net.IP) net.IP

ToInternal resolves a external IP to internal

Types

type Option

type Option func(*externalIPsServer)

Option option for externalips server

func WithFilePath

func WithFilePath(p string) Option

WithFilePath means listen file by passed path

func WithUpdateChannel

func WithUpdateChannel(ch <-chan map[string]string) Option

WithUpdateChannel passed to server specific channel for listening updates

Jump to

Keyboard shortcuts

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