network

package
v0.1.62 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIInt

func APIInt(api string) int

func Container

func Container(port uint16) *basev0.NetworkInstance

func HashInt

func HashInt(s string, low, high int) int

func IsPortAvailable

func IsPortAvailable(port int) bool

func Native

func Native(port uint16) *basev0.NetworkInstance

func ToNamedPort

func ToNamedPort(ctx context.Context, app string, svc string, name string, api string) uint16

ToNamedPort strategy: APP-SVC-API Between 1100(0) and 4999(9) First 11 -> 49: hash app Next 0 -> 9: hash svc Next 0 - 9: hash name Last Digit: API 0: TCP 1: HTTP/ REST 2: gRPC

Types

type DNSManager

type DNSManager interface {
	Get(service *configurations.Service, endpoint *configurations.Endpoint, env *configurations.Environment) (*basev0.DNS, error)
}

type FixedStrategy

type FixedStrategy struct {
}

type RuntimeManager

type RuntimeManager struct {
	DNSManager DNSManager
	// contains filtered or unexported fields
}

func NewManager

func NewManager(_ context.Context) (*RuntimeManager, error)

func (RuntimeManager) GenerateNetworkMappings

func (m RuntimeManager) GenerateNetworkMappings(ctx context.Context, service *configurations.Service, endpoints []*basev0.Endpoint) ([]*basev0.NetworkMapping, error)

GenerateNetworkMappings generates network mappings for a service endpoints

Jump to

Keyboard shortcuts

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