cluster

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for cluster API.

func (*Client) GetCluster

func (a *Client) GetCluster(params *GetClusterParams, opts ...ClientOption) (*GetClusterOK, error)

GetClustergets remote clusters connection status.

Returns the list of remote clusters and their status..

This method does not support injected context. However, timeout and opentracing contexts are honored whenever enabled.

If you need to pass a specific context, use Client.GetClusterContext instead.

func (*Client) GetClusterContext added in v1.20.0

func (a *Client) GetClusterContext(ctx context.Context, params *GetClusterParams, opts ...ClientOption) (*GetClusterOK, error)

GetClusterContextgets remote clusters connection status.

Returns the list of remote clusters and their status..

Do not use the deprecated [GetClusterParams.Context] with this method: it would be ignored.

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ContextualTransport)

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption may be used to customize the behavior of Client methods.

type ClientService

type ClientService interface {

	// GetCluster get remote clusters connection status.
	GetCluster(params *GetClusterParams, opts ...ClientOption) (*GetClusterOK, error)

	// GetClusterContext get remote clusters connection status.
	GetClusterContext(ctx context.Context, params *GetClusterParams, opts ...ClientOption) (*GetClusterOK, error)

	SetTransport(transport runtime.ContextualTransport)
}

ClientService is the interface for Client methods.

func New

New creates a new cluster API client.

func NewClientWithBasicAuth added in v1.16.5

func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService

New creates a new cluster API client with basic auth credentials.

It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.

func NewClientWithBearerToken added in v1.16.5

func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService

New creates a new cluster API client with a bearer token for authentication.

It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.

type GetClusterOK

type GetClusterOK struct {
	Payload []*common.RemoteCluster
}

GetClusterOK describes a response with status code 200, with default header values.

Success

func NewGetClusterOK

func NewGetClusterOK() *GetClusterOK

NewGetClusterOK creates a GetClusterOK with default headers values

func (*GetClusterOK) Code

func (o *GetClusterOK) Code() int

Code gets the status code for the get cluster o k response

func (*GetClusterOK) Error

func (o *GetClusterOK) Error() string

func (*GetClusterOK) GetPayload

func (o *GetClusterOK) GetPayload() []*common.RemoteCluster

func (*GetClusterOK) IsClientError

func (o *GetClusterOK) IsClientError() bool

IsClientError returns true when this get cluster o k response has a 4xx status code

func (*GetClusterOK) IsCode

func (o *GetClusterOK) IsCode(code int) bool

IsCode returns true when this get cluster o k response a status code equal to that given

func (*GetClusterOK) IsRedirect

func (o *GetClusterOK) IsRedirect() bool

IsRedirect returns true when this get cluster o k response has a 3xx status code

func (*GetClusterOK) IsServerError

func (o *GetClusterOK) IsServerError() bool

IsServerError returns true when this get cluster o k response has a 5xx status code

func (*GetClusterOK) IsSuccess

func (o *GetClusterOK) IsSuccess() bool

IsSuccess returns true when this get cluster o k response has a 2xx status code

func (*GetClusterOK) String

func (o *GetClusterOK) String() string

type GetClusterParams

type GetClusterParams struct {
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetClusterParams contains all the parameters to send to the API endpoint

for the get cluster operation.

Typically these are written to a http.Request.

func NewGetClusterParams

func NewGetClusterParams() *GetClusterParams

NewGetClusterParams creates a new GetClusterParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewGetClusterParamsWithContext deprecated

func NewGetClusterParamsWithContext(ctx context.Context) *GetClusterParams

NewGetClusterParamsWithContext creates a new GetClusterParams object with the ability to set a context for a request.

Deprecated: use the operation call with context to pass the context instead of GetClusterParams.

func NewGetClusterParamsWithHTTPClient

func NewGetClusterParamsWithHTTPClient(client *http.Client) *GetClusterParams

NewGetClusterParamsWithHTTPClient creates a new GetClusterParams object with the ability to set a custom HTTPClient for a request.

func NewGetClusterParamsWithTimeout

func NewGetClusterParamsWithTimeout(timeout time.Duration) *GetClusterParams

NewGetClusterParamsWithTimeout creates a new GetClusterParams object with the ability to set a timeout on a request.

func (*GetClusterParams) SetContext deprecated

func (o *GetClusterParams) SetContext(ctx context.Context)

SetContext adds the context to the get cluster params.

Deprecated: use the operation call with context to pass the context instead of GetClusterParams.

func (*GetClusterParams) SetDefaults

func (o *GetClusterParams) SetDefaults()

SetDefaults hydrates default values in the get cluster params (not the query body).

All values with no default are reset to their zero value.

func (*GetClusterParams) SetHTTPClient

func (o *GetClusterParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get cluster params.

func (*GetClusterParams) SetTimeout

func (o *GetClusterParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get cluster params.

func (*GetClusterParams) WithContext deprecated

func (o *GetClusterParams) WithContext(ctx context.Context) *GetClusterParams

WithContext adds the context to the get cluster params.

Deprecated: use the operation call with context to pass the context instead of GetClusterParams.

func (*GetClusterParams) WithDefaults

func (o *GetClusterParams) WithDefaults() *GetClusterParams

WithDefaults hydrates default values in the get cluster params (not the query body).

All values with no default are reset to their zero value.

func (*GetClusterParams) WithHTTPClient

func (o *GetClusterParams) WithHTTPClient(client *http.Client) *GetClusterParams

WithHTTPClient adds the HTTPClient to the get cluster params.

func (*GetClusterParams) WithTimeout

func (o *GetClusterParams) WithTimeout(timeout time.Duration) *GetClusterParams

WithTimeout adds the timeout to the get cluster params.

func (*GetClusterParams) WriteToRequest

func (o *GetClusterParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a runtime.ClientRequest.

type GetClusterReader

type GetClusterReader struct {
	// contains filtered or unexported fields
}

GetClusterReader is a Reader for the GetCluster structure.

func (*GetClusterReader) ReadResponse

func (o *GetClusterReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

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