cluster

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2021 License: Apache-2.0 Imports: 28 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.DeployResult, 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.APIResponse, error)

func GetAPIByID added in v0.23.0

func GetAPIByID(operatorConfig OperatorConfig, apiName string, apiID string) ([]schema.APIResponse, error)

func GetAPIs

func GetAPIs(operatorConfig OperatorConfig) ([]schema.APIResponse, error)

func GetBatchJob added in v0.27.0

func GetBatchJob(operatorConfig OperatorConfig, apiName string, jobID string) (schema.BatchJobResponse, error)

func GetJobLogs added in v0.36.0

func GetJobLogs(operatorConfig OperatorConfig, apiName string, jobID string) (schema.LogResponse, error)

func GetLogs added in v0.36.0

func GetLogs(operatorConfig OperatorConfig, apiName string) (schema.LogResponse, error)

func GetTaskJob added in v0.27.0

func GetTaskJob(operatorConfig OperatorConfig, apiName string, jobID string) (schema.TaskJobResponse, 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 *archive.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 StopJob added in v0.19.0

func StopJob(operatorConfig OperatorConfig, kind userconfig.Kind, apiName string, jobID string) (schema.DeleteResponse, error)

func StreamJobLogs added in v0.21.0

func StreamJobLogs(operatorConfig OperatorConfig, apiName string, jobID string) 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
}

type OperatorConfig

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

Jump to

Keyboard shortcuts

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