cluster

package
v0.0.0-...-c510420 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package cluster helps with cluster discovery related operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoveryClient

type DiscoveryClient struct {
	discovery.DiscoveryInterface
}

DiscoveryClient is a cluster discovery client.

func New

func New(c *rest.Config) (*DiscoveryClient, error)

New returns a DiscoveryClient given a rest config.

func NewFromDiscoveryClient

func NewFromDiscoveryClient(discoveryClient discovery.DiscoveryInterface) *DiscoveryClient

NewFromDiscoveryClient returns a DiscoveryClient given an implementation of the DiscoveryInterface.

func (*DiscoveryClient) ClusterVersionCompare

func (d *DiscoveryClient) ClusterVersionCompare(targetVersion string) (int, error)

ClusterVersionCompare compares the cluster version with a given target version. 0 = cluster version equal to target version -1 = cluster version less than target version 1 = cluster version greater than target version

func (*DiscoveryClient) GetClusterVersion

func (d *DiscoveryClient) GetClusterVersion() (string, error)

GetClusterVersion returns the base version of the cluster, without any extra information.

func (*DiscoveryClient) HasResource

func (d *DiscoveryClient) HasResource(apiVersion, kind string) (bool, error)

HasResource takes an API version and a kind of a resource and checks if the resource is supported by the API server.

Jump to

Keyboard shortcuts

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