network

package
v0.9.1-rc.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyAppName          = errors.New("app name must not be empty")
	ErrEmptyProjectName      = errors.New("project name must not be empty")
	ErrEmptyStackName        = errors.New("stack name must not be empty")
	ErrEmptySelectors        = errors.New("selectors must not be empty")
	ErrEmptyPorts            = errors.New("ports must not be empty")
	ErrEmptyType             = errors.New("type must not be empty when public")
	ErrUnsupportedType       = errors.New("type only support aliyun and aws for now")
	ErrInconsistentType      = errors.New("public ports must use same type")
	ErrInvalidPort           = errors.New("port must be between 1 and 65535")
	ErrInvalidTargetPort     = errors.New("targetPort must be between 1 and 65535 if exist")
	ErrInvalidProtocol       = errors.New("protocol must be TCP or UDP")
	ErrDuplicatePortProtocol = errors.New("port-protocol pair must not be duplicate")
)

Functions

func NewPortsGenerator

func NewPortsGenerator(
	appName, projectName, stackName string,
	selectors, labels, annotations map[string]string,
	ports []network.Port,
) (modules.Generator, error)

NewPortsGenerator returns a new portsGenerator instance, and do the validation and completion job.

func NewPortsGeneratorFunc

func NewPortsGeneratorFunc(
	appName, projectName, stackName string,
	selectors, labels, annotations map[string]string,
	ports []network.Port,
) modules.NewGeneratorFunc

NewPortsGeneratorFunc returns a new NewGeneratorFunc that returns a portsGenerator instance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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