gke

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package gke implements Google Kubernetes Engine specific features like cluster discovery

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterID added in v1.3.0

func GetClusterID(project string, location string, name string) string

func SliceAndValidateClusterID added in v1.3.0

func SliceAndValidateClusterID(id string) (string, string, string, error)

Types

type AssetInventoryClient added in v1.0.0

type AssetInventoryClient interface {
	SearchAllResources(ctx context.Context, req *assetpb.SearchAllResourcesRequest, opts ...gax.CallOption) *asset.ResourceSearchResultIterator
	Close() error
}

type AssetInventoryDiscoveryClient added in v1.0.0

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

func (*AssetInventoryDiscoveryClient) Close added in v1.0.0

Close closes the client and underlying connections to other services.

func (*AssetInventoryDiscoveryClient) GetClustersInFolder added in v1.0.0

func (c *AssetInventoryDiscoveryClient) GetClustersInFolder(number string) ([]string, error)

GetClustersInFolder finds GKE clusters in a given GCP folder (identified by number) and returns slice with their identifiers.

func (*AssetInventoryDiscoveryClient) GetClustersInOrg added in v1.0.0

func (c *AssetInventoryDiscoveryClient) GetClustersInOrg(number string) ([]string, error)

GetClustersInOrg finds GKE clusters in a given GCP organization (identified by number) and returns slice with their identifiers.

func (*AssetInventoryDiscoveryClient) GetClustersInProject added in v1.0.0

func (c *AssetInventoryDiscoveryClient) GetClustersInProject(name string) ([]string, error)

GetClustersInProject finds GKE clusters in a given GCP project (identified by name) and returns slice with their identifiers.

type AssetInventorySearchResultIterator added in v1.0.0

type AssetInventorySearchResultIterator interface {
	Next() (*assetpb.ResourceSearchResult, error)
}

type DiscoveryClient added in v1.0.0

type DiscoveryClient interface {
	GetClustersInProject(name string) ([]string, error)
	GetClustersInFolder(number string) ([]string, error)
	GetClustersInOrg(number string) ([]string, error)
	Close() error
}

func NewDiscoveryClient added in v1.0.0

func NewDiscoveryClient(ctx context.Context) (DiscoveryClient, error)

func NewDiscoveryClientWithCredentialsFile added in v1.0.0

func NewDiscoveryClientWithCredentialsFile(ctx context.Context, credentialsFile string) (DiscoveryClient, error)

func NewLocalDiscoveryClient added in v1.1.0

func NewLocalDiscoveryClient(filename string) DiscoveryClient

Jump to

Keyboard shortcuts

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