Documentation ¶
Overview ¶
Package clients implements clients for services consumed by data inputs
Index ¶
- Constants
- func NewKubernetesClientBuilder(ctx context.Context, kubeConfig *clientcmdapi.Config) *kubernetesClientBuilder
- func NewMetricsClientBuilder(ctx context.Context) *metricsClientBuilder
- func StringSliceContains(hay []string, needle string) bool
- type KubernetesClient
- type KubernetesDiscoveryClient
- type Metric
- type MetricQuery
- type MetricsClient
- type Resource
- type ResourceType
- type TokenSource
Constants ¶
View Source
const ( MetricQueryWildcardClusterID = `\$CLUSTER_ID` MetricQueryWildcardClusterName = `\$CLUSTER_NAME` MetricQueryWildcardClusterLocation = `\$CLUSTER_LOCATION` MetricQueryWildcardClusterProject = `\$CLUSTER_PROJECT` )
Variables ¶
This section is empty.
Functions ¶
func NewKubernetesClientBuilder ¶
func NewKubernetesClientBuilder(ctx context.Context, kubeConfig *clientcmdapi.Config) *kubernetesClientBuilder
func NewMetricsClientBuilder ¶
func StringSliceContains ¶
Types ¶
type KubernetesClient ¶
type KubernetesClient interface { GetNamespaces() ([]string, error) GetFetchableResourceTypes() ([]*ResourceType, error) GetResources(toBeFetched []*ResourceType, namespaces []string) ([]*Resource, error) GetNamespacedResources(resourceType ResourceType, namespace string) ([]*Resource, error) }
type KubernetesDiscoveryClient ¶
type KubernetesDiscoveryClient interface {
ServerGroupsAndResources() ([]*metav1.APIGroup, []*metav1.APIResourceList, error)
}
type MetricQuery ¶
type MetricsClient ¶
type MetricsClient interface { GetMetric(query MetricQuery, clusterID string) (*Metric, error) GetMetricsForCluster(queries []MetricQuery, clusterID string) (map[string]Metric, error) }
type Resource ¶
type Resource struct { Type ResourceType Data map[string]interface{} }
type ResourceType ¶
type TokenSource ¶
func NewGoogleTokenSource ¶
func NewGoogleTokenSource(ctx context.Context) (TokenSource, error)
func NewGoogleTokenSourceWithCredentials ¶
func NewGoogleTokenSourceWithCredentials(ctx context.Context, credentialsFile string) (TokenSource, error)
Click to show internal directories.
Click to hide internal directories.