clusterinfo

package
v0.0.0-...-f132488 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache provides access to a cached cluster information map

func NewCache

func NewCache(ctx context.Context, projectID string, credentials *google.Credentials, refresh time.Duration) (*Cache, error)

NewCache creates a cluster info cache which is refreshed every `refresh`

func (*Cache) GetConnectInfoForEndpoint

func (c *Cache) GetConnectInfoForEndpoint(endpoint string) *ConnectInfo

GetConnectInfoForEndpoint returns connect information for the host, or nil if not found

func (*Cache) GetMap

func (c *Cache) GetMap() *Map

GetMap returns a copy of the cluster info map

type ConnectInfo

type ConnectInfo struct {
	Name                 string
	Endpoint             string
	ClusterCaCertificate string
	RootCAs              *x509.CertPool
}

ConnectInfo provides basie GKE cluster connect information

type Map

type Map map[string]*ConnectInfo

Map provides a lookup for cluster connection information base on the hostname

Jump to

Keyboard shortcuts

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