gcp

package
v0.0.0-...-414c732 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const SevenDaysDuration int64 = int64(7 * 24 * int(time.Hour/time.Second))

Variables

This section is empty.

Functions

func NewGkeCluster

func NewGkeCluster(host, proxyUrl string) (kubernetes.Kubernetes, error)

func NewGoogleAuth

func NewGoogleAuth() (rest.AuthProvider, error)

func NewGoogleAuthImplement

func NewGoogleAuthImplement(
	addr string,
	config map[string]string,
	persister rest.AuthProviderConfigPersister,
) (rest.AuthProvider, error)

func NewTenant

func NewTenant(
	provider Api,
	name string,
	readable bool,
	writeable bool,
) (kubernetes.Tenant, error)

func NewTenantFromMetadata

func NewTenantFromMetadata(
	metadata string,
	timeout time.Duration,
) (kubernetes.Tenant, error)

Types

type Api

type Api interface {
	GetKubernete(name string) (kubernetes.Kubernetes, error)
	GetProject() string
	GetLocation() string

	ListKubernetes() []kubernetes.Kubernetes

	ReadTimeseries(
		ctx context.Context,
		filter string,
	) *monitoring.TimeSeriesIterator
	WriteTimeseries(
		ctx context.Context,
		metricType, resourceType string,
		labels map[string]string,
		points []*monitoringpb.Point,
	) error
}

func NewApi

func NewApi(
	project, location string,
	params ...GcpExternalParam,
) (Api, error)

type AuthProvider

type AuthProvider interface {
	rest.AuthProvider
}

type GcpExternalParam

type GcpExternalParam struct {
	ProxyUrl     string `json:"proxy_url"`
	RegistryName string `json:"registry_name"`
}

Jump to

Keyboard shortcuts

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