cluster

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrFailedToConnectOperator       = "cli.failed_to_connect_operator"
	ErrOperatorSocketRead            = "cli.operator_socket_read"
	ErrResponseUnknown               = "cli.response_unknown"
	ErrOperatorResponseUnknown       = "cli.operator_response_unknown"
	ErrOperatorStreamResponseUnknown = "cli.operator_stream_response_unknown"
)

Variables

This section is empty.

Functions

func Delete

func Delete(operatorConfig OperatorConfig, apiName string, keepCache bool, force bool) (schema.DeleteResponse, error)

func Deploy

func Deploy(operatorConfig OperatorConfig, configPath string, deploymentBytesMap map[string][]byte, force bool) (schema.DeployResponse, error)

func ErrorFailedToConnectOperator

func ErrorFailedToConnectOperator(originalError error, envName string, operatorURL string) error

func ErrorOperatorResponseUnknown

func ErrorOperatorResponseUnknown(body string, statusCode int) error

func ErrorOperatorSocketRead

func ErrorOperatorSocketRead(err error) error

func ErrorOperatorStreamResponseUnknown

func ErrorOperatorStreamResponseUnknown(body string, statusCode int) error

func ErrorResponseUnknown

func ErrorResponseUnknown(body string, statusCode int) error

func GetAPI

func GetAPI(operatorConfig OperatorConfig, apiName string) (schema.GetAPIResponse, error)

func GetAPIs

func GetAPIs(operatorConfig OperatorConfig) (schema.GetAPIsResponse, error)

func HTTPDelete

func HTTPDelete(operatorConfig OperatorConfig, endpoint string, qParams ...map[string]string) ([]byte, error)

func HTTPGet

func HTTPGet(operatorConfig OperatorConfig, endpoint string, qParams ...map[string]string) ([]byte, error)

func HTTPPostJSON

func HTTPPostJSON(operatorConfig OperatorConfig, endpoint string, jsonRequestData []byte, qParams ...map[string]string) ([]byte, error)

func HTTPPostNoBody

func HTTPPostNoBody(operatorConfig OperatorConfig, endpoint string, qParams ...map[string]string) ([]byte, error)

func HTTPPostObjAsJSON

func HTTPPostObjAsJSON(operatorConfig OperatorConfig, endpoint string, requestData interface{}, qParams ...map[string]string) ([]byte, error)

func HTTPUpload

func HTTPUpload(operatorConfig OperatorConfig, endpoint string, input *HTTPUploadInput, qParams ...map[string]string) ([]byte, error)

func HTTPUploadZip

func HTTPUploadZip(operatorConfig OperatorConfig, endpoint string, zipInput *zip.Input, fileName string, qParams ...map[string]string) ([]byte, error)

func Info

func Info(operatorConfig OperatorConfig) (*schema.InfoResponse, error)

func Refresh

func Refresh(operatorConfig OperatorConfig, apiName string, force bool) (schema.RefreshResponse, error)

func StreamLogs

func StreamLogs(operatorConfig OperatorConfig, apiName string) error

Types

type HTTPUploadInput

type HTTPUploadInput struct {
	FilePaths map[string]string
	Bytes     map[string][]byte
}

type OperatorClient

type OperatorClient struct {
	*http.Client
}

func (*OperatorClient) MakeRequest

func (client *OperatorClient) MakeRequest(operatorConfig OperatorConfig, request *http.Request) ([]byte, error)

type OperatorConfig

type OperatorConfig struct {
	Telemetry          bool
	ClientID           string
	EnvName            string
	OperatorEndpoint   string
	AWSAccessKeyID     string
	AWSSecretAccessKey string
}

func (OperatorConfig) AuthHeader

func (oc OperatorConfig) AuthHeader() string

Jump to

Keyboard shortcuts

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