detector

package module
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 4 Imported by: 6

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

View Source
var ErrUnknownProvider = errors.New("unknown provider")

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 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