Documentation ¶
Index ¶
- Variables
- func NewKubeClient(kubeConfig, kubeMaster string) (*kubernetes.Clientset, error)
- type ClientGenerator
- type Config
- type SingletonClientGenerator
- type Source
- func BuildWithConfig(source string, p ClientGenerator, cfg *Config) (Source, error)
- func ByNames(p ClientGenerator, names []string, cfg *Config) ([]Source, error)
- func NewConnectorSource(remoteServer string) (Source, error)
- func NewDedupSource(source Source) Source
- func NewFakeSource(fqdnTemplate string) (Source, error)
- func NewIngressSource(kubeClient kubernetes.Interface, namespace, annotationFilter string, ...) (Source, error)
- func NewMultiSource(children []Source) Source
- func NewServiceSource(kubeClient kubernetes.Interface, namespace, annotationFilter string, ...) (Source, error)
Constants ¶
This section is empty.
Variables ¶
var ErrSourceNotFound = errors.New("source not found")
ErrSourceNotFound is returned when a requested source doesn't exist.
Functions ¶
func NewKubeClient ¶ added in v0.4.0
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 ¶ added in v0.4.0
type ClientGenerator interface {
KubeClient() (kubernetes.Interface, error)
}
ClientGenerator provides clients
type Config ¶ added in v0.4.0
type Config struct { Namespace string AnnotationFilter string FQDNTemplate string CombineFQDNAndAnnotation bool Compatibility string PublishInternal bool ConnectorServer string }
Config holds shared configuration options for all Sources.
type SingletonClientGenerator ¶ added in v0.4.0
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 ¶ added in v0.4.0
func (p *SingletonClientGenerator) KubeClient() (kubernetes.Interface, error)
KubeClient generates a kube client if it was not created before
type Source ¶
Source defines the interface Endpoint sources should implement.
func BuildWithConfig ¶ added in v0.4.0
func BuildWithConfig(source string, p ClientGenerator, cfg *Config) (Source, error)
BuildWithConfig allows to generate a Source implementation from the shared config
func ByNames ¶ added in v0.4.0
func ByNames(p ClientGenerator, names []string, cfg *Config) ([]Source, error)
ByNames returns multiple Sources given multiple names.
func NewConnectorSource ¶ added in v0.5.2
NewConnectorSource creates a new connectorSource with the given config.
func NewDedupSource ¶ added in v0.3.0
NewDedupSource creates a new dedupSource wrapping the provided Source.
func NewFakeSource ¶ added in v0.4.0
NewFakeSource creates a new fakeSource with the given config.
func NewIngressSource ¶
func NewIngressSource(kubeClient kubernetes.Interface, namespace, annotationFilter string, fqdnTemplate string, combineFqdnAnnotation bool) (Source, error)
NewIngressSource creates a new ingressSource with the given config.
func NewMultiSource ¶
NewMultiSource creates a new multiSource.