Documentation
¶
Index ¶
- type Client
- type ClientService
- type GetMetricsDefault
- type GetMetricsInternalServerError
- type GetMetricsOK
- type GetMetricsParams
- func (o *GetMetricsParams) SetContext(ctx context.Context)
- func (o *GetMetricsParams) SetEndDate(endDate *strfmt.DateTime)
- func (o *GetMetricsParams) SetGranularity(granularity *string)
- func (o *GetMetricsParams) SetGroupBy(groupBy *string)
- func (o *GetMetricsParams) SetGrouping(grouping []string)
- func (o *GetMetricsParams) SetHTTPClient(client *http.Client)
- func (o *GetMetricsParams) SetInstanceName(instanceName *string)
- func (o *GetMetricsParams) SetPop(pop *string)
- func (o *GetMetricsParams) SetRegion(region *string)
- func (o *GetMetricsParams) SetStackID(stackID string)
- func (o *GetMetricsParams) SetStartDate(startDate *strfmt.DateTime)
- func (o *GetMetricsParams) SetTimeout(timeout time.Duration)
- func (o *GetMetricsParams) SetType(typeVar *string)
- func (o *GetMetricsParams) SetWorkloadID(workloadID *string)
- func (o *GetMetricsParams) WithContext(ctx context.Context) *GetMetricsParams
- func (o *GetMetricsParams) WithEndDate(endDate *strfmt.DateTime) *GetMetricsParams
- func (o *GetMetricsParams) WithGranularity(granularity *string) *GetMetricsParams
- func (o *GetMetricsParams) WithGroupBy(groupBy *string) *GetMetricsParams
- func (o *GetMetricsParams) WithGrouping(grouping []string) *GetMetricsParams
- func (o *GetMetricsParams) WithHTTPClient(client *http.Client) *GetMetricsParams
- func (o *GetMetricsParams) WithInstanceName(instanceName *string) *GetMetricsParams
- func (o *GetMetricsParams) WithPop(pop *string) *GetMetricsParams
- func (o *GetMetricsParams) WithRegion(region *string) *GetMetricsParams
- func (o *GetMetricsParams) WithStackID(stackID string) *GetMetricsParams
- func (o *GetMetricsParams) WithStartDate(startDate *strfmt.DateTime) *GetMetricsParams
- func (o *GetMetricsParams) WithTimeout(timeout time.Duration) *GetMetricsParams
- func (o *GetMetricsParams) WithType(typeVar *string) *GetMetricsParams
- func (o *GetMetricsParams) WithWorkloadID(workloadID *string) *GetMetricsParams
- func (o *GetMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type GetMetricsReader
- type GetMetricsUnauthorized
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 metrics API
func (*Client) GetMetrics ¶
func (a *Client) GetMetrics(params *GetMetricsParams, authInfo runtime.ClientAuthInfoWriter) (*GetMetricsOK, error)
GetMetrics retrieves usage metrics for all workloads in a stack a specific workload or a specific instance in a workload
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type ClientService ¶
type ClientService interface { GetMetrics(params *GetMetricsParams, authInfo runtime.ClientAuthInfoWriter) (*GetMetricsOK, 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 metrics API client.
type GetMetricsDefault ¶
type GetMetricsDefault struct { Payload *workload_models.StackpathapiStatus // contains filtered or unexported fields }
GetMetricsDefault handles this case with default header values.
Default error structure.
func NewGetMetricsDefault ¶
func NewGetMetricsDefault(code int) *GetMetricsDefault
NewGetMetricsDefault creates a GetMetricsDefault with default headers values
func (*GetMetricsDefault) Code ¶
func (o *GetMetricsDefault) Code() int
Code gets the status code for the get metrics default response
func (*GetMetricsDefault) Error ¶
func (o *GetMetricsDefault) Error() string
func (*GetMetricsDefault) GetPayload ¶
func (o *GetMetricsDefault) GetPayload() *workload_models.StackpathapiStatus
type GetMetricsInternalServerError ¶
type GetMetricsInternalServerError struct {
Payload *workload_models.StackpathapiStatus
}
GetMetricsInternalServerError handles this case with default header values.
Internal server error.
func NewGetMetricsInternalServerError ¶
func NewGetMetricsInternalServerError() *GetMetricsInternalServerError
NewGetMetricsInternalServerError creates a GetMetricsInternalServerError with default headers values
func (*GetMetricsInternalServerError) Error ¶
func (o *GetMetricsInternalServerError) Error() string
func (*GetMetricsInternalServerError) GetPayload ¶
func (o *GetMetricsInternalServerError) GetPayload() *workload_models.StackpathapiStatus
type GetMetricsOK ¶
type GetMetricsOK struct {
Payload *workload_models.PrometheusMetrics
}
GetMetricsOK handles this case with default header values.
GetMetricsOK get metrics o k
func NewGetMetricsOK ¶
func NewGetMetricsOK() *GetMetricsOK
NewGetMetricsOK creates a GetMetricsOK with default headers values
func (*GetMetricsOK) Error ¶
func (o *GetMetricsOK) Error() string
func (*GetMetricsOK) GetPayload ¶
func (o *GetMetricsOK) GetPayload() *workload_models.PrometheusMetrics
type GetMetricsParams ¶
type GetMetricsParams struct { /*EndDate An upper bound date to search metrics for. */ EndDate *strfmt.DateTime /*Granularity*/ Granularity *string /*GroupBy*/ GroupBy *string /*Grouping List of fields to group by. */ Grouping []string /*InstanceName The name of instance name within a workload to filter metrics for. */ InstanceName *string /*Pop A StackPath POP to filter traffic metrics for. This field does not apply when retrieving INSTANCE type metrics */ Pop *string /*Region*/ Region *string /*StackID The ID of the stack containing the workloads and instances to retrieve metrics for */ StackID string /*StartDate A lower bound date to search metrics for. */ StartDate *strfmt.DateTime /*Type*/ Type *string /*WorkloadID The ID of a workload to filter metrics for. */ WorkloadID *string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
GetMetricsParams contains all the parameters to send to the API endpoint for the get metrics operation typically these are written to a http.Request
func NewGetMetricsParams ¶
func NewGetMetricsParams() *GetMetricsParams
NewGetMetricsParams creates a new GetMetricsParams object with the default values initialized.
func NewGetMetricsParamsWithContext ¶
func NewGetMetricsParamsWithContext(ctx context.Context) *GetMetricsParams
NewGetMetricsParamsWithContext creates a new GetMetricsParams object with the default values initialized, and the ability to set a context for a request
func NewGetMetricsParamsWithHTTPClient ¶
func NewGetMetricsParamsWithHTTPClient(client *http.Client) *GetMetricsParams
NewGetMetricsParamsWithHTTPClient creates a new GetMetricsParams object with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetMetricsParamsWithTimeout ¶
func NewGetMetricsParamsWithTimeout(timeout time.Duration) *GetMetricsParams
NewGetMetricsParamsWithTimeout creates a new GetMetricsParams object with the default values initialized, and the ability to set a timeout on a request
func (*GetMetricsParams) SetContext ¶
func (o *GetMetricsParams) SetContext(ctx context.Context)
SetContext adds the context to the get metrics params
func (*GetMetricsParams) SetEndDate ¶
func (o *GetMetricsParams) SetEndDate(endDate *strfmt.DateTime)
SetEndDate adds the endDate to the get metrics params
func (*GetMetricsParams) SetGranularity ¶
func (o *GetMetricsParams) SetGranularity(granularity *string)
SetGranularity adds the granularity to the get metrics params
func (*GetMetricsParams) SetGroupBy ¶
func (o *GetMetricsParams) SetGroupBy(groupBy *string)
SetGroupBy adds the groupBy to the get metrics params
func (*GetMetricsParams) SetGrouping ¶
func (o *GetMetricsParams) SetGrouping(grouping []string)
SetGrouping adds the grouping to the get metrics params
func (*GetMetricsParams) SetHTTPClient ¶
func (o *GetMetricsParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the get metrics params
func (*GetMetricsParams) SetInstanceName ¶
func (o *GetMetricsParams) SetInstanceName(instanceName *string)
SetInstanceName adds the instanceName to the get metrics params
func (*GetMetricsParams) SetPop ¶
func (o *GetMetricsParams) SetPop(pop *string)
SetPop adds the pop to the get metrics params
func (*GetMetricsParams) SetRegion ¶
func (o *GetMetricsParams) SetRegion(region *string)
SetRegion adds the region to the get metrics params
func (*GetMetricsParams) SetStackID ¶
func (o *GetMetricsParams) SetStackID(stackID string)
SetStackID adds the stackId to the get metrics params
func (*GetMetricsParams) SetStartDate ¶
func (o *GetMetricsParams) SetStartDate(startDate *strfmt.DateTime)
SetStartDate adds the startDate to the get metrics params
func (*GetMetricsParams) SetTimeout ¶
func (o *GetMetricsParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the get metrics params
func (*GetMetricsParams) SetType ¶
func (o *GetMetricsParams) SetType(typeVar *string)
SetType adds the type to the get metrics params
func (*GetMetricsParams) SetWorkloadID ¶
func (o *GetMetricsParams) SetWorkloadID(workloadID *string)
SetWorkloadID adds the workloadId to the get metrics params
func (*GetMetricsParams) WithContext ¶
func (o *GetMetricsParams) WithContext(ctx context.Context) *GetMetricsParams
WithContext adds the context to the get metrics params
func (*GetMetricsParams) WithEndDate ¶
func (o *GetMetricsParams) WithEndDate(endDate *strfmt.DateTime) *GetMetricsParams
WithEndDate adds the endDate to the get metrics params
func (*GetMetricsParams) WithGranularity ¶
func (o *GetMetricsParams) WithGranularity(granularity *string) *GetMetricsParams
WithGranularity adds the granularity to the get metrics params
func (*GetMetricsParams) WithGroupBy ¶
func (o *GetMetricsParams) WithGroupBy(groupBy *string) *GetMetricsParams
WithGroupBy adds the groupBy to the get metrics params
func (*GetMetricsParams) WithGrouping ¶
func (o *GetMetricsParams) WithGrouping(grouping []string) *GetMetricsParams
WithGrouping adds the grouping to the get metrics params
func (*GetMetricsParams) WithHTTPClient ¶
func (o *GetMetricsParams) WithHTTPClient(client *http.Client) *GetMetricsParams
WithHTTPClient adds the HTTPClient to the get metrics params
func (*GetMetricsParams) WithInstanceName ¶
func (o *GetMetricsParams) WithInstanceName(instanceName *string) *GetMetricsParams
WithInstanceName adds the instanceName to the get metrics params
func (*GetMetricsParams) WithPop ¶
func (o *GetMetricsParams) WithPop(pop *string) *GetMetricsParams
WithPop adds the pop to the get metrics params
func (*GetMetricsParams) WithRegion ¶
func (o *GetMetricsParams) WithRegion(region *string) *GetMetricsParams
WithRegion adds the region to the get metrics params
func (*GetMetricsParams) WithStackID ¶
func (o *GetMetricsParams) WithStackID(stackID string) *GetMetricsParams
WithStackID adds the stackID to the get metrics params
func (*GetMetricsParams) WithStartDate ¶
func (o *GetMetricsParams) WithStartDate(startDate *strfmt.DateTime) *GetMetricsParams
WithStartDate adds the startDate to the get metrics params
func (*GetMetricsParams) WithTimeout ¶
func (o *GetMetricsParams) WithTimeout(timeout time.Duration) *GetMetricsParams
WithTimeout adds the timeout to the get metrics params
func (*GetMetricsParams) WithType ¶
func (o *GetMetricsParams) WithType(typeVar *string) *GetMetricsParams
WithType adds the typeVar to the get metrics params
func (*GetMetricsParams) WithWorkloadID ¶
func (o *GetMetricsParams) WithWorkloadID(workloadID *string) *GetMetricsParams
WithWorkloadID adds the workloadID to the get metrics params
func (*GetMetricsParams) WriteToRequest ¶
func (o *GetMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type GetMetricsReader ¶
type GetMetricsReader struct {
// contains filtered or unexported fields
}
GetMetricsReader is a Reader for the GetMetrics structure.
func (*GetMetricsReader) ReadResponse ¶
func (o *GetMetricsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type GetMetricsUnauthorized ¶
type GetMetricsUnauthorized struct {
}GetMetricsUnauthorized handles this case with default header values.
Returned when an unauthorized request is attempted.
func NewGetMetricsUnauthorized ¶
func NewGetMetricsUnauthorized() *GetMetricsUnauthorized
NewGetMetricsUnauthorized creates a GetMetricsUnauthorized with default headers values
func (*GetMetricsUnauthorized) Error ¶
func (o *GetMetricsUnauthorized) Error() string
func (*GetMetricsUnauthorized) GetPayload ¶
func (o *GetMetricsUnauthorized) GetPayload() *workload_models.StackpathapiStatus