clients

package
v0.0.0-...-3bfe646 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 37 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultEtcdMembers

func DefaultEtcdMembers() (etcd.MembersAPI, error)

DefaultEtcdMembers returns etcd members API client with default configuration

func Etcd

func Etcd(config *EtcdConfig) (etcd.Client, error)

Etcd returns a new instance of bare bones etcd client

func EtcdMembers

func EtcdMembers(config *EtcdConfig) (etcd.MembersAPI, error)

EtcdMembers returns a new instance of etcd members API client

func Teleport

func Teleport(operator ops.Operator, proxyHost, clusterName string) (*client.TeleportClient, error)

Teleport returns a new teleport client

func TeleportProxy

func TeleportProxy(ctx context.Context, operator ops.Operator, proxyHost, clusterName string) (*client.ProxyClient, error)

TeleportProxy returns a new teleport proxy client

Types

type AuthClient

type AuthClient struct {
	io.Closer
	auth.ClientI
	// contains filtered or unexported fields
}

AuthClient represents the client to the auth server

func TeleportAuth

func TeleportAuth(ctx context.Context, operator ops.Operator, proxyHost, clusterName string) (*AuthClient, error)

TeleportAuth returns a new teleport auth server client

func (*AuthClient) Close

func (r *AuthClient) Close() error

Close closes this client

type ClusterClients

type ClusterClients struct {
	ClusterClientsConfig
	sync.RWMutex
	// contains filtered or unexported fields
}

ClusterClients provides access to remote clusters' services such as operator or application

func NewClusterClients

func NewClusterClients(conf ClusterClientsConfig) (*ClusterClients, error)

NewClusterClients returns a new cluster clients interface

func (*ClusterClients) AppsClient

func (r *ClusterClients) AppsClient(clusterName string) (app.Applications, error)

AppsClient returns remote apps service for the specified cluster

func (*ClusterClients) KubeClient

func (r *ClusterClients) KubeClient(operator ops.Operator, user ops.UserInfo, clusterName string) (*kubernetes.Clientset, error)

KubeClient returns Kubernetes API client for the specified cluster and user

func (*ClusterClients) OpsClient

func (r *ClusterClients) OpsClient(clusterName string) (ops.Operator, error)

OpsClient returns remote operator for the specified cluster

type ClusterClientsConfig

type ClusterClientsConfig struct {
	// Backend is a storage backend
	Backend storage.Backend
	// Tunnel is a reverse tunnel server providing access to remote sites
	Tunnel reversetunnel.Server
}

ClusterClientsConfig contains configuration needed for remote clients

type EtcdConfig

type EtcdConfig struct {
	// Endpoints is etcd endpoints to connect to
	Endpoints []string
	// CAFile is path to etcd certificate authority
	CAFile string
	// CertFile is path to etcd certificate
	CertFile string
	// KeyFile is path to etcd private key
	KeyFile string
	// SecretsDir is the directory with etcd secrets
	SecretsDir string
	// DialTimeout is etcd dial timeout
	DialTimeout time.Duration
}

EtcdConfig is the etcd client configuration

func (*EtcdConfig) CheckAndSetDefaults

func (c *EtcdConfig) CheckAndSetDefaults() error

CheckAndSetDefaults checks etcd client configuration and sets default values

Jump to

Keyboard shortcuts

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