source

package
v0.0.0-...-eedacba Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSourceNotFound = errors.New("source not found")

ErrSourceNotFound is returned when a requested source doesn't exist.

Functions

func NewKubeClient

func NewKubeClient(kubeConfig, kubeMaster string) (*kubernetes.Clientset, error)

NewKubeClient returns a new Kubernetes client object. It takes a Config and uses KubeMaster and KubeConfig attributes to connect to the cluster. If KubeConfig isn't provided it defaults to using the recommended default.

Types

type ClientGenerator

type ClientGenerator interface {
	KubeClient() (kubernetes.Interface, error)
}

ClientGenerator provides clients

type Config

type Config struct {
	Namespace                string
	AnnotationFilter         string
	FQDNTemplate             string
	CombineFQDNAndAnnotation bool
	Compatibility            string
	PublishInternal          bool
	DryRun                   bool
}

Config holds shared configuration options for all Sources.

type NodeIPs

type NodeIPs struct {
	// contains filtered or unexported fields
}

type SingletonClientGenerator

type SingletonClientGenerator struct {
	KubeConfig string
	KubeMaster string

	sync.Once
	// contains filtered or unexported fields
}

SingletonClientGenerator stores provider clients and guarantees that only one instance of client will be generated

func (*SingletonClientGenerator) KubeClient

KubeClient generates a kube client if it was not created before

type Source

type Source interface {
	ExternalIPSetting() (*setting.ExternalIPSetting, error)
}

Source defines the interface Endpoint sources should implement.

func BuildWithConfig

func BuildWithConfig(source string, p ClientGenerator, cfg *Config, clusterName string) (Source, error)

BuildWithConfig allows to generate a Source implementation from the shared config

func ByNames

func ByNames(p ClientGenerator, names []string, cfg *Config, clusterName string) ([]Source, error)

ByNames returns multiple Sources given multiple names.

func NewFakeSource

func NewFakeSource(fqdnTemplate string) (Source, error)

NewFakeSource creates a new fakeSource with the given config.

func NewMultiSource

func NewMultiSource(children []Source) Source

NewMultiSource creates a new multiSource.

func NewServiceSource

func NewServiceSource(kubeClient kubernetes.Interface, clusterName, namespace, annotationFilter string, fqdnTemplate string, combineFqdnAnnotation bool, compatibility string, publishInternal bool, dryRun bool) (Source, error)

NewServiceSource creates a new serviceSource with the given config.

Jump to

Keyboard shortcuts

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