client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	Raw *x509.Certificate
	DER []byte
	PEM []byte
}

func GetCertificate

func GetCertificate(apiServerAddr string) (cert Certificate, err error)

func SignCertByToken

func SignCertByToken(apiServerAddr string, token string, csr []byte, certPool *x509.CertPool) (cert Certificate, err error)

type HttpError

type HttpError struct {
	Response *http.Response
	Message  string
}

func (HttpError) Error

func (e HttpError) Error() string

type Interface

type Interface interface {
	GetEndpointsAndCommunities() (apiserver.EndpointsAndCommunity, error)
	UpdateCluster(cluster apis.Cluster) error
	UpdateEndpoints(endpoints []apis.Endpoint) error
	SignCert(csr []byte) (Certificate, error)
	GetClusterCIDRs() (map[string][]string, error)
}

func NewClient

func NewClient(apiServerAddr string, clusterName string, transport http.RoundTripper) (Interface, error)

Jump to

Keyboard shortcuts

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