provider

package
v0.100.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package provider contains the cluster name provider

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chain

func Chain(logger *zap.Logger, providers map[string]source.Provider, priorityList []string) (source.Provider, error)

Chain providers into a single provider that returns the first available hostname.

func Config

func Config(hostname string) source.Provider

Config returns fixed hostname.

func Once

func Once(provider source.Provider) source.Provider

Once wraps a provider to call it only once.

Types

type ClusterNameProvider

type ClusterNameProvider interface {
	ClusterName(context.Context) (string, error)
}

func ChainCluster

func ChainCluster(logger *zap.Logger, providers map[string]ClusterNameProvider, priorityList []string) (ClusterNameProvider, error)

Chain providers into a single provider that returns the first available hostname.

Jump to

Keyboard shortcuts

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