stats

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 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 stats API

func (*Client) GetStats

func (a *Client) GetStats(params *GetStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetStatsOK, error)

GetStats gets stats

Getting stats from the HAProxy.

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 {
	GetStats(params *GetStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetStatsOK, 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 stats API client.

type GetStatsDefault

type GetStatsDefault struct {

	/* Configuration file version
	 */
	ConfigurationVersion string

	Payload *models.Error
	// contains filtered or unexported fields
}
GetStatsDefault describes a response with status code -1, with default header values.

General Error

func NewGetStatsDefault

func NewGetStatsDefault(code int) *GetStatsDefault

NewGetStatsDefault creates a GetStatsDefault with default headers values

func (*GetStatsDefault) Code

func (o *GetStatsDefault) Code() int

Code gets the status code for the get stats default response

func (*GetStatsDefault) Error

func (o *GetStatsDefault) Error() string

func (*GetStatsDefault) GetPayload

func (o *GetStatsDefault) GetPayload() *models.Error

type GetStatsInternalServerError

type GetStatsInternalServerError struct {
	Payload models.NativeStats
}
GetStatsInternalServerError describes a response with status code 500, with default header values.

Internal Server Error

func NewGetStatsInternalServerError

func NewGetStatsInternalServerError() *GetStatsInternalServerError

NewGetStatsInternalServerError creates a GetStatsInternalServerError with default headers values

func (*GetStatsInternalServerError) Error

func (*GetStatsInternalServerError) GetPayload

type GetStatsOK

type GetStatsOK struct {
	Payload models.NativeStats
}
GetStatsOK describes a response with status code 200, with default header values.

Success

func NewGetStatsOK

func NewGetStatsOK() *GetStatsOK

NewGetStatsOK creates a GetStatsOK with default headers values

func (*GetStatsOK) Error

func (o *GetStatsOK) Error() string

func (*GetStatsOK) GetPayload

func (o *GetStatsOK) GetPayload() models.NativeStats

type GetStatsParams

type GetStatsParams struct {

	/* Name.

	   Object name to get stats for
	*/
	Name *string

	/* Parent.

	   Object parent name to get stats for, in case the object is a server
	*/
	Parent *string

	/* Type.

	   Object type to get stats for (one of frontend, backend, server)
	*/
	Type *string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetStatsParams contains all the parameters to send to the API endpoint

for the get stats operation.

Typically these are written to a http.Request.

func NewGetStatsParams

func NewGetStatsParams() *GetStatsParams

NewGetStatsParams creates a new GetStatsParams 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 NewGetStatsParamsWithContext

func NewGetStatsParamsWithContext(ctx context.Context) *GetStatsParams

NewGetStatsParamsWithContext creates a new GetStatsParams object with the ability to set a context for a request.

func NewGetStatsParamsWithHTTPClient

func NewGetStatsParamsWithHTTPClient(client *http.Client) *GetStatsParams

NewGetStatsParamsWithHTTPClient creates a new GetStatsParams object with the ability to set a custom HTTPClient for a request.

func NewGetStatsParamsWithTimeout

func NewGetStatsParamsWithTimeout(timeout time.Duration) *GetStatsParams

NewGetStatsParamsWithTimeout creates a new GetStatsParams object with the ability to set a timeout on a request.

func (*GetStatsParams) SetContext

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

SetContext adds the context to the get stats params

func (*GetStatsParams) SetDefaults

func (o *GetStatsParams) SetDefaults()

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

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

func (*GetStatsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get stats params

func (*GetStatsParams) SetName

func (o *GetStatsParams) SetName(name *string)

SetName adds the name to the get stats params

func (*GetStatsParams) SetParent

func (o *GetStatsParams) SetParent(parent *string)

SetParent adds the parent to the get stats params

func (*GetStatsParams) SetTimeout

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

SetTimeout adds the timeout to the get stats params

func (*GetStatsParams) SetType

func (o *GetStatsParams) SetType(typeVar *string)

SetType adds the type to the get stats params

func (*GetStatsParams) WithContext

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

WithContext adds the context to the get stats params

func (*GetStatsParams) WithDefaults

func (o *GetStatsParams) WithDefaults() *GetStatsParams

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

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

func (*GetStatsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get stats params

func (*GetStatsParams) WithName

func (o *GetStatsParams) WithName(name *string) *GetStatsParams

WithName adds the name to the get stats params

func (*GetStatsParams) WithParent

func (o *GetStatsParams) WithParent(parent *string) *GetStatsParams

WithParent adds the parent to the get stats params

func (*GetStatsParams) WithTimeout

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

WithTimeout adds the timeout to the get stats params

func (*GetStatsParams) WithType

func (o *GetStatsParams) WithType(typeVar *string) *GetStatsParams

WithType adds the typeVar to the get stats params

func (*GetStatsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetStatsReader

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

GetStatsReader is a Reader for the GetStats structure.

func (*GetStatsReader) ReadResponse

func (o *GetStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, 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