external

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: BSD-3-Clause Imports: 25 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotKubernetesPool = errors.New("not a kubernetes pool")
	ErrClusterNotFound   = errors.New("cluster not found")
)

Functions

func MetricsRoundTripper

func MetricsRoundTripper(next http.RoundTripper) http.RoundTripper

Types

type BaseHTTPClient

type BaseHTTPClient struct {
	sync.RWMutex

	Timeout     time.Duration
	URL         string
	User        string
	Password    string
	Token       string
	OAuthURL    string
	OAuthId     string
	OAuthSecret string
	Logger      logrus.FieldLogger
	// contains filtered or unexported fields
}

func (*BaseHTTPClient) DoRequestData

func (e *BaseHTTPClient) DoRequestData(method, path string, body io.Reader, headers map[string]string) ([]byte, error)

func (*BaseHTTPClient) DoRequestDataCtx

func (e *BaseHTTPClient) DoRequestDataCtx(ctx context.Context, method, path string, body io.Reader, headers map[string]string) ([]byte, error)

func (*BaseHTTPClient) GetClient

func (e *BaseHTTPClient) GetClient() (*http.Client, error)

type HTTPError

type HTTPError struct {
	StatusCode int
	Body       string
	Headers    http.Header
}

func (*HTTPError) Error

func (e *HTTPError) Error() string

type TsuruClient

type TsuruClient interface {
	PoolCluster(tsuruPool pool.Pool) (*provTypes.Cluster, error)
	Cluster(clusterName string) (*provTypes.Cluster, error)
	JobInfo(jobName string) (*jobTypes.Job, error)
	AppInfo(appName string) (*app.App, error)
	PoolInfo(poolName string) (*pool.Pool, error)
	Clusters() ([]provTypes.Cluster, error)
}

func NewTsuruClient

func NewTsuruClient() TsuruClient

Jump to

Keyboard shortcuts

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