detector

package module
v0.0.0-...-e37e358 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

README

Provider Detector

A library to identify the provider of a Kubernetes Cluster

Usage

Pass in a kubernetes.Interface and get a string back for the provider

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectProvider

func DetectProvider(ctx context.Context, k8sClient kubernetes.Interface) (string, error)

DetectProvider accepts a k8s interface and checks all registered providers for a match

func ListRegisteredProviders

func ListRegisteredProviders() []string

ListRegisteredProviders returns a list of the names of all providers

Types

type ErrUnknownProvider

type ErrUnknownProvider struct{}

func (ErrUnknownProvider) Error

func (e ErrUnknownProvider) Error() string

type IsProvider

type IsProvider func(ctx context.Context, k8sClient kubernetes.Interface) (bool, error)

IsProvider is the interface all providers need to implement

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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