addresses

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	KubernetesServiceName         = "KUBERNETES_SERVICE_NAME"
	KubernetesPodNamespaceEnvVar  = "KUBERNETES_POD_NAMESPACE"
	KubernetesClusterDomainEnvVar = "KUBERNETES_CLUSTER_DOMAIN"
)
View Source
const (
	DefaultKubernetesClusterDomain = "cluster.local"
)

Variables

View Source
var (
	ErrNotInCluster = fmt.Errorf("unable to load in-cluster addresses, %s and %s must be defined",
		KubernetesServiceName, KubernetesPodNamespaceEnvVar)
)

Functions

func Get

func InCluster

func InCluster() ([]computev1alpha1.MachinePoolAddress, error)

func IsInCluster

func IsInCluster() bool

func Load

func Load(data []byte) ([]computev1alpha1.MachinePoolAddress, error)

func LoadFromFile

func LoadFromFile(filename string) ([]computev1alpha1.MachinePoolAddress, error)

func LocalIP

func LocalIP() (string, error)

Types

type GetOption

type GetOption interface {
	ApplyToGet(o *GetOptions)
}

type GetOptions

type GetOptions struct {
	Filename         string
	IPOverride       string
	HostnameOverride string
}

func (*GetOptions) ApplyOptions

func (o *GetOptions) ApplyOptions(opts []GetOption)

func (*GetOptions) ApplyToGet

func (o *GetOptions) ApplyToGet(o2 *GetOptions)

func (*GetOptions) BindFlags

func (o *GetOptions) BindFlags(fs *pflag.FlagSet)

Jump to

Keyboard shortcuts

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