health

package
v0.40.7 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 10 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 health API

func (*Client) IsInstanceAlive

func (a *Client) IsInstanceAlive(params *IsInstanceAliveParams, opts ...ClientOption) (*IsInstanceAliveOK, error)
IsInstanceAlive checks alive status

This endpoint returns a 200 status code when the HTTP server is up running.

This status does currently not include checks whether the database connection is working.

If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set.

Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.

func (*Client) IsInstanceReady

func (a *Client) IsInstanceReady(params *IsInstanceReadyParams, opts ...ClientOption) (*IsInstanceReadyOK, error)
IsInstanceReady checks readiness status

This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g.

the database) are responsive as well.

If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set.

Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	IsInstanceAlive(params *IsInstanceAliveParams, opts ...ClientOption) (*IsInstanceAliveOK, error)

	IsInstanceReady(params *IsInstanceReadyParams, opts ...ClientOption) (*IsInstanceReadyOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new health API client.

type IsInstanceAliveDefault added in v0.40.4

type IsInstanceAliveDefault struct {
	Payload models.UnexpectedError
	// contains filtered or unexported fields
}

IsInstanceAliveDefault describes a response with status code -1, with default header values.

unexpectedError

func NewIsInstanceAliveDefault added in v0.40.4

func NewIsInstanceAliveDefault(code int) *IsInstanceAliveDefault

NewIsInstanceAliveDefault creates a IsInstanceAliveDefault with default headers values

func (*IsInstanceAliveDefault) Code added in v0.40.4

func (o *IsInstanceAliveDefault) Code() int

Code gets the status code for the is instance alive default response

func (*IsInstanceAliveDefault) Error added in v0.40.4

func (o *IsInstanceAliveDefault) Error() string

func (*IsInstanceAliveDefault) GetPayload added in v0.40.4

func (*IsInstanceAliveDefault) IsClientError added in v0.40.4

func (o *IsInstanceAliveDefault) IsClientError() bool

IsClientError returns true when this is instance alive default response has a 4xx status code

func (*IsInstanceAliveDefault) IsCode added in v0.40.4

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

IsCode returns true when this is instance alive default response a status code equal to that given

func (*IsInstanceAliveDefault) IsRedirect added in v0.40.4

func (o *IsInstanceAliveDefault) IsRedirect() bool

IsRedirect returns true when this is instance alive default response has a 3xx status code

func (*IsInstanceAliveDefault) IsServerError added in v0.40.4

func (o *IsInstanceAliveDefault) IsServerError() bool

IsServerError returns true when this is instance alive default response has a 5xx status code

func (*IsInstanceAliveDefault) IsSuccess added in v0.40.4

func (o *IsInstanceAliveDefault) IsSuccess() bool

IsSuccess returns true when this is instance alive default response has a 2xx status code

func (*IsInstanceAliveDefault) String added in v0.40.4

func (o *IsInstanceAliveDefault) String() string

type IsInstanceAliveOK

type IsInstanceAliveOK struct {
	Payload *models.HealthStatus
}

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

healthStatus

func NewIsInstanceAliveOK

func NewIsInstanceAliveOK() *IsInstanceAliveOK

NewIsInstanceAliveOK creates a IsInstanceAliveOK with default headers values

func (*IsInstanceAliveOK) Error

func (o *IsInstanceAliveOK) Error() string

func (*IsInstanceAliveOK) GetPayload

func (o *IsInstanceAliveOK) GetPayload() *models.HealthStatus

func (*IsInstanceAliveOK) IsClientError

func (o *IsInstanceAliveOK) IsClientError() bool

IsClientError returns true when this is instance alive o k response has a 4xx status code

func (*IsInstanceAliveOK) IsCode

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

IsCode returns true when this is instance alive o k response a status code equal to that given

func (*IsInstanceAliveOK) IsRedirect

func (o *IsInstanceAliveOK) IsRedirect() bool

IsRedirect returns true when this is instance alive o k response has a 3xx status code

func (*IsInstanceAliveOK) IsServerError

func (o *IsInstanceAliveOK) IsServerError() bool

IsServerError returns true when this is instance alive o k response has a 5xx status code

func (*IsInstanceAliveOK) IsSuccess

func (o *IsInstanceAliveOK) IsSuccess() bool

IsSuccess returns true when this is instance alive o k response has a 2xx status code

func (*IsInstanceAliveOK) String

func (o *IsInstanceAliveOK) String() string

type IsInstanceAliveParams

type IsInstanceAliveParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

IsInstanceAliveParams contains all the parameters to send to the API endpoint

for the is instance alive operation.

Typically these are written to a http.Request.

func NewIsInstanceAliveParams

func NewIsInstanceAliveParams() *IsInstanceAliveParams

NewIsInstanceAliveParams creates a new IsInstanceAliveParams 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 NewIsInstanceAliveParamsWithContext

func NewIsInstanceAliveParamsWithContext(ctx context.Context) *IsInstanceAliveParams

NewIsInstanceAliveParamsWithContext creates a new IsInstanceAliveParams object with the ability to set a context for a request.

func NewIsInstanceAliveParamsWithHTTPClient

func NewIsInstanceAliveParamsWithHTTPClient(client *http.Client) *IsInstanceAliveParams

NewIsInstanceAliveParamsWithHTTPClient creates a new IsInstanceAliveParams object with the ability to set a custom HTTPClient for a request.

func NewIsInstanceAliveParamsWithTimeout

func NewIsInstanceAliveParamsWithTimeout(timeout time.Duration) *IsInstanceAliveParams

NewIsInstanceAliveParamsWithTimeout creates a new IsInstanceAliveParams object with the ability to set a timeout on a request.

func (*IsInstanceAliveParams) SetContext

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

SetContext adds the context to the is instance alive params

func (*IsInstanceAliveParams) SetDefaults

func (o *IsInstanceAliveParams) SetDefaults()

SetDefaults hydrates default values in the is instance alive params (not the query body).

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

func (*IsInstanceAliveParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the is instance alive params

func (*IsInstanceAliveParams) SetTimeout

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

SetTimeout adds the timeout to the is instance alive params

func (*IsInstanceAliveParams) WithContext

WithContext adds the context to the is instance alive params

func (*IsInstanceAliveParams) WithDefaults

func (o *IsInstanceAliveParams) WithDefaults() *IsInstanceAliveParams

WithDefaults hydrates default values in the is instance alive params (not the query body).

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

func (*IsInstanceAliveParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the is instance alive params

func (*IsInstanceAliveParams) WithTimeout

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

WithTimeout adds the timeout to the is instance alive params

func (*IsInstanceAliveParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type IsInstanceAliveReader

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

IsInstanceAliveReader is a Reader for the IsInstanceAlive structure.

func (*IsInstanceAliveReader) ReadResponse

func (o *IsInstanceAliveReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type IsInstanceReadyDefault added in v0.40.4

type IsInstanceReadyDefault struct {
	Payload models.UnexpectedError
	// contains filtered or unexported fields
}

IsInstanceReadyDefault describes a response with status code -1, with default header values.

unexpectedError

func NewIsInstanceReadyDefault added in v0.40.4

func NewIsInstanceReadyDefault(code int) *IsInstanceReadyDefault

NewIsInstanceReadyDefault creates a IsInstanceReadyDefault with default headers values

func (*IsInstanceReadyDefault) Code added in v0.40.4

func (o *IsInstanceReadyDefault) Code() int

Code gets the status code for the is instance ready default response

func (*IsInstanceReadyDefault) Error added in v0.40.4

func (o *IsInstanceReadyDefault) Error() string

func (*IsInstanceReadyDefault) GetPayload added in v0.40.4

func (*IsInstanceReadyDefault) IsClientError added in v0.40.4

func (o *IsInstanceReadyDefault) IsClientError() bool

IsClientError returns true when this is instance ready default response has a 4xx status code

func (*IsInstanceReadyDefault) IsCode added in v0.40.4

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

IsCode returns true when this is instance ready default response a status code equal to that given

func (*IsInstanceReadyDefault) IsRedirect added in v0.40.4

func (o *IsInstanceReadyDefault) IsRedirect() bool

IsRedirect returns true when this is instance ready default response has a 3xx status code

func (*IsInstanceReadyDefault) IsServerError added in v0.40.4

func (o *IsInstanceReadyDefault) IsServerError() bool

IsServerError returns true when this is instance ready default response has a 5xx status code

func (*IsInstanceReadyDefault) IsSuccess added in v0.40.4

func (o *IsInstanceReadyDefault) IsSuccess() bool

IsSuccess returns true when this is instance ready default response has a 2xx status code

func (*IsInstanceReadyDefault) String added in v0.40.4

func (o *IsInstanceReadyDefault) String() string

type IsInstanceReadyOK

type IsInstanceReadyOK struct {
	Payload *models.HealthStatus
}

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

healthStatus

func NewIsInstanceReadyOK

func NewIsInstanceReadyOK() *IsInstanceReadyOK

NewIsInstanceReadyOK creates a IsInstanceReadyOK with default headers values

func (*IsInstanceReadyOK) Error

func (o *IsInstanceReadyOK) Error() string

func (*IsInstanceReadyOK) GetPayload

func (o *IsInstanceReadyOK) GetPayload() *models.HealthStatus

func (*IsInstanceReadyOK) IsClientError

func (o *IsInstanceReadyOK) IsClientError() bool

IsClientError returns true when this is instance ready o k response has a 4xx status code

func (*IsInstanceReadyOK) IsCode

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

IsCode returns true when this is instance ready o k response a status code equal to that given

func (*IsInstanceReadyOK) IsRedirect

func (o *IsInstanceReadyOK) IsRedirect() bool

IsRedirect returns true when this is instance ready o k response has a 3xx status code

func (*IsInstanceReadyOK) IsServerError

func (o *IsInstanceReadyOK) IsServerError() bool

IsServerError returns true when this is instance ready o k response has a 5xx status code

func (*IsInstanceReadyOK) IsSuccess

func (o *IsInstanceReadyOK) IsSuccess() bool

IsSuccess returns true when this is instance ready o k response has a 2xx status code

func (*IsInstanceReadyOK) String

func (o *IsInstanceReadyOK) String() string

type IsInstanceReadyParams

type IsInstanceReadyParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

IsInstanceReadyParams contains all the parameters to send to the API endpoint

for the is instance ready operation.

Typically these are written to a http.Request.

func NewIsInstanceReadyParams

func NewIsInstanceReadyParams() *IsInstanceReadyParams

NewIsInstanceReadyParams creates a new IsInstanceReadyParams 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 NewIsInstanceReadyParamsWithContext

func NewIsInstanceReadyParamsWithContext(ctx context.Context) *IsInstanceReadyParams

NewIsInstanceReadyParamsWithContext creates a new IsInstanceReadyParams object with the ability to set a context for a request.

func NewIsInstanceReadyParamsWithHTTPClient

func NewIsInstanceReadyParamsWithHTTPClient(client *http.Client) *IsInstanceReadyParams

NewIsInstanceReadyParamsWithHTTPClient creates a new IsInstanceReadyParams object with the ability to set a custom HTTPClient for a request.

func NewIsInstanceReadyParamsWithTimeout

func NewIsInstanceReadyParamsWithTimeout(timeout time.Duration) *IsInstanceReadyParams

NewIsInstanceReadyParamsWithTimeout creates a new IsInstanceReadyParams object with the ability to set a timeout on a request.

func (*IsInstanceReadyParams) SetContext

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

SetContext adds the context to the is instance ready params

func (*IsInstanceReadyParams) SetDefaults

func (o *IsInstanceReadyParams) SetDefaults()

SetDefaults hydrates default values in the is instance ready params (not the query body).

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

func (*IsInstanceReadyParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the is instance ready params

func (*IsInstanceReadyParams) SetTimeout

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

SetTimeout adds the timeout to the is instance ready params

func (*IsInstanceReadyParams) WithContext

WithContext adds the context to the is instance ready params

func (*IsInstanceReadyParams) WithDefaults

func (o *IsInstanceReadyParams) WithDefaults() *IsInstanceReadyParams

WithDefaults hydrates default values in the is instance ready params (not the query body).

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

func (*IsInstanceReadyParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the is instance ready params

func (*IsInstanceReadyParams) WithTimeout

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

WithTimeout adds the timeout to the is instance ready params

func (*IsInstanceReadyParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type IsInstanceReadyReader

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

IsInstanceReadyReader is a Reader for the IsInstanceReady structure.

func (*IsInstanceReadyReader) ReadResponse

func (o *IsInstanceReadyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type IsInstanceReadyServiceUnavailable

type IsInstanceReadyServiceUnavailable struct {
	Payload *models.HealthNotReadyStatus
}

IsInstanceReadyServiceUnavailable describes a response with status code 503, with default header values.

healthNotReadyStatus

func NewIsInstanceReadyServiceUnavailable

func NewIsInstanceReadyServiceUnavailable() *IsInstanceReadyServiceUnavailable

NewIsInstanceReadyServiceUnavailable creates a IsInstanceReadyServiceUnavailable with default headers values

func (*IsInstanceReadyServiceUnavailable) Error

func (*IsInstanceReadyServiceUnavailable) GetPayload

func (*IsInstanceReadyServiceUnavailable) IsClientError

func (o *IsInstanceReadyServiceUnavailable) IsClientError() bool

IsClientError returns true when this is instance ready service unavailable response has a 4xx status code

func (*IsInstanceReadyServiceUnavailable) IsCode

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

IsCode returns true when this is instance ready service unavailable response a status code equal to that given

func (*IsInstanceReadyServiceUnavailable) IsRedirect

func (o *IsInstanceReadyServiceUnavailable) IsRedirect() bool

IsRedirect returns true when this is instance ready service unavailable response has a 3xx status code

func (*IsInstanceReadyServiceUnavailable) IsServerError

func (o *IsInstanceReadyServiceUnavailable) IsServerError() bool

IsServerError returns true when this is instance ready service unavailable response has a 5xx status code

func (*IsInstanceReadyServiceUnavailable) IsSuccess

func (o *IsInstanceReadyServiceUnavailable) IsSuccess() bool

IsSuccess returns true when this is instance ready service unavailable response has a 2xx status code

func (*IsInstanceReadyServiceUnavailable) String

Jump to

Keyboard shortcuts

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