util

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidEndpoint = errors.New("invalid endpoint")

Functions

func BuildEndpointURL added in v0.5.0

func BuildEndpointURL(rawIP, rawPort, pod, namespace string) (string, error)

BuildEndpointURL returns a URL formatted address of the pod that has this sidecar running. The format of the URL depends on the arguments passed to this function, it will return either

  • a ValidateControllerEndpoint() if rawIP is set
  • pod://<pod>:<port> if pod is set, and rawIP and namespace are not set
  • pod://<pod>.<namespace>:<port> if pod, namespace are set, and rawIP not

func ValidateControllerEndpoint

func ValidateControllerEndpoint(rawIP, rawPort string) (string, error)

ValidateControllerEndpoint validates given ip address and port, returning valid endpoint containing both ip address and port.

Types

This section is empty.

Jump to

Keyboard shortcuts

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