remoteclient

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	// Build will return a static kubeclient for the remote cluster.
	Build() (client.Client, error)

	// BuildDynamic will return a dynamic kubeclient for the remote cluster.
	BuildDynamic() (dynamic.Interface, error)

	// Unreachable returns true if Hive has not been able to reach the remote cluster.
	// Note that this function will not attempt to reach the remote cluster. It only checks the current conditions on
	// the ClusterDeployment to determine if the remote cluster is reachable.
	Unreachable() bool

	// APIURL returns the API URL used to connect to the remote cluster.
	APIURL() (string, error)

	// RESTConfig returns the config for a REST client that connects to the remote cluster.
	RESTConfig() (*rest.Config, error)

	// UsePrimaryAPIURL will use the primary API URL. If there is an API URL override, then that is the primary.
	// Otherwise, the primary is the default API URL.
	UsePrimaryAPIURL() Builder

	// UseSecondaryAPIURL will use the secondary API URL. If there is an API URL override, then the initial API URL
	// is the secondary.
	UseSecondaryAPIURL() Builder
}

Builder is used to build API clients to the remote cluster

func NewBuilder

func NewBuilder(c client.Client, cd *hivev1.ClusterDeployment, controllerName string) Builder

NewBuilder creates a new Builder for creating a client to connect to the remote cluster associated with the specified ClusterDeployment. The controllerName is needed for metrics.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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