cluster

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrParsingEndpoint error message for cluster endpoint parsing
	ErrParsingEndpoint = errors.New("error parsing the cluster endpoint, please check that you have typed it correctly")
	// ErrMakingRequest error message for making requests
	ErrMakingRequest = errors.New("error making the request")
	// ErrSendingRequest error message for sending requests
	ErrSendingRequest = errors.New("unable to communicate with the cluster, please check that the endpoint is well typed and accessible")
)

Functions

func CheckStatusCode

func CheckStatusCode(res *http.Response) error

CheckStatusCode checks if a cluster response is valid and returns an appropriate error if not

Types

type Cluster

type Cluster struct {
	Endpoint        string `json:"endpoint"`
	AuthUser        string `json:"auth_user,omitempty"`
	AuthPassword    string `json:"auth_password,omitempty"`
	OIDCAccountName string `json:"oidc_account_name,omitempty"`
	SSLVerify       bool   `json:"ssl_verify"`
	Memory          string `json:"memory"`
	LogLevel        string `json:"log_level"`
}

Cluster defines the configuration of an OSCAR cluster

func (*Cluster) GetClient

func (cluster *Cluster) GetClient(args ...int) *http.Client

GetClient returns an HTTP client to communicate with the cluster

func (*Cluster) GetClusterConfig added in v1.3.0

func (cluster *Cluster) GetClusterConfig() (cfg types.Config, err error)

GetClusterConfig returns the config of an OSCAR cluster

func (*Cluster) GetClusterInfo

func (cluster *Cluster) GetClusterInfo() (info types.Info, err error)

GetClusterInfo returns info from an OSCAR cluster

Jump to

Keyboard shortcuts

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