instance_logs

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MPL-2.0 Imports: 11 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 instance logs API

func (*Client) GetLogs

func (a *Client) GetLogs(params *GetLogsParams, authInfo runtime.ClientAuthInfoWriter) (*GetLogsOK, error)

GetLogs retrieves a stream of an instance s logs

Retrieve a stream of logs generated by a workload instance's containers. Logs are generated by the container themselves and are not modified by StackPath. Log contents vary by the application running in the container, though many containerized applications are configured to log to STDOUT and STDERR.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientService

type ClientService interface {
	GetLogs(params *GetLogsParams, authInfo runtime.ClientAuthInfoWriter) (*GetLogsOK, 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 instance logs API client.

type GetLogsDefault

type GetLogsDefault struct {
	Payload *workload_models.StackpathapiStatus
	// contains filtered or unexported fields
}

GetLogsDefault handles this case with default header values.

Default error structure.

func NewGetLogsDefault

func NewGetLogsDefault(code int) *GetLogsDefault

NewGetLogsDefault creates a GetLogsDefault with default headers values

func (*GetLogsDefault) Code

func (o *GetLogsDefault) Code() int

Code gets the status code for the get logs default response

func (*GetLogsDefault) Error

func (o *GetLogsDefault) Error() string

func (*GetLogsDefault) GetPayload

type GetLogsInternalServerError

type GetLogsInternalServerError struct {
	Payload *workload_models.StackpathapiStatus
}

GetLogsInternalServerError handles this case with default header values.

Internal server error.

func NewGetLogsInternalServerError

func NewGetLogsInternalServerError() *GetLogsInternalServerError

NewGetLogsInternalServerError creates a GetLogsInternalServerError with default headers values

func (*GetLogsInternalServerError) Error

func (*GetLogsInternalServerError) GetPayload

type GetLogsOK

type GetLogsOK struct {
	Payload *workload_models.V1LogChunk
}

GetLogsOK handles this case with default header values.

(streaming responses)

func NewGetLogsOK

func NewGetLogsOK() *GetLogsOK

NewGetLogsOK creates a GetLogsOK with default headers values

func (*GetLogsOK) Error

func (o *GetLogsOK) Error() string

func (*GetLogsOK) GetPayload

func (o *GetLogsOK) GetPayload() *workload_models.V1LogChunk

type GetLogsParams

type GetLogsParams struct {

	/*ContainerName
	  The name of the container to obtain logs for. This defaults to first container in instance.

	*/
	ContainerName *string
	/*Follow
	  Whether or not to follow the instance's log stream. This defaults to false.

	*/
	Follow *bool
	/*InstanceName
	  The name of the instance to obtain logs for

	*/
	InstanceName string
	/*LimitBytes
	  The number of bytes to read from the server before terminating log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.

	*/
	LimitBytes *string
	/*Previous
	  Whether or not to return log entries made by previously terminated containers. This defaults to false.

	*/
	Previous *bool
	/*SinceSeconds
	  A relative time in seconds before the current time from which to show logs. If this value precedes the time an instance was started, only logs since the instance's start time will be returned. If this value is in the future, no logs will be returned.

	Only one of since_seconds or since_time may be specified

	*/
	SinceSeconds *string
	/*SinceTime
	  An RFC3339 timestamp from which to show logs. If this value precedes the time an instance was started, only logs since the instance's start time will be returned. If this value is in the future, no logs will be returned.

	Only one of since_seconds or since_time may be specified

	*/
	SinceTime *strfmt.DateTime
	/*StackID
	  The ID of the stack containing the workload whose instances to retrieve

	*/
	StackID string
	/*TailLines
	  The number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or since_seconds or since_time.

	*/
	TailLines *string
	/*Timestamps
	  Whether or not to add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. This defaults to false.

	*/
	Timestamps *bool
	/*WorkloadID
	  The ID the workload whose instances to retrieve

	*/
	WorkloadID string

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

GetLogsParams contains all the parameters to send to the API endpoint for the get logs operation typically these are written to a http.Request

func NewGetLogsParams

func NewGetLogsParams() *GetLogsParams

NewGetLogsParams creates a new GetLogsParams object with the default values initialized.

func NewGetLogsParamsWithContext

func NewGetLogsParamsWithContext(ctx context.Context) *GetLogsParams

NewGetLogsParamsWithContext creates a new GetLogsParams object with the default values initialized, and the ability to set a context for a request

func NewGetLogsParamsWithHTTPClient

func NewGetLogsParamsWithHTTPClient(client *http.Client) *GetLogsParams

NewGetLogsParamsWithHTTPClient creates a new GetLogsParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewGetLogsParamsWithTimeout

func NewGetLogsParamsWithTimeout(timeout time.Duration) *GetLogsParams

NewGetLogsParamsWithTimeout creates a new GetLogsParams object with the default values initialized, and the ability to set a timeout on a request

func (*GetLogsParams) SetContainerName

func (o *GetLogsParams) SetContainerName(containerName *string)

SetContainerName adds the containerName to the get logs params

func (*GetLogsParams) SetContext

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

SetContext adds the context to the get logs params

func (*GetLogsParams) SetFollow

func (o *GetLogsParams) SetFollow(follow *bool)

SetFollow adds the follow to the get logs params

func (*GetLogsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get logs params

func (*GetLogsParams) SetInstanceName

func (o *GetLogsParams) SetInstanceName(instanceName string)

SetInstanceName adds the instanceName to the get logs params

func (*GetLogsParams) SetLimitBytes

func (o *GetLogsParams) SetLimitBytes(limitBytes *string)

SetLimitBytes adds the limitBytes to the get logs params

func (*GetLogsParams) SetPrevious

func (o *GetLogsParams) SetPrevious(previous *bool)

SetPrevious adds the previous to the get logs params

func (*GetLogsParams) SetSinceSeconds

func (o *GetLogsParams) SetSinceSeconds(sinceSeconds *string)

SetSinceSeconds adds the sinceSeconds to the get logs params

func (*GetLogsParams) SetSinceTime

func (o *GetLogsParams) SetSinceTime(sinceTime *strfmt.DateTime)

SetSinceTime adds the sinceTime to the get logs params

func (*GetLogsParams) SetStackID

func (o *GetLogsParams) SetStackID(stackID string)

SetStackID adds the stackId to the get logs params

func (*GetLogsParams) SetTailLines

func (o *GetLogsParams) SetTailLines(tailLines *string)

SetTailLines adds the tailLines to the get logs params

func (*GetLogsParams) SetTimeout

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

SetTimeout adds the timeout to the get logs params

func (*GetLogsParams) SetTimestamps

func (o *GetLogsParams) SetTimestamps(timestamps *bool)

SetTimestamps adds the timestamps to the get logs params

func (*GetLogsParams) SetWorkloadID

func (o *GetLogsParams) SetWorkloadID(workloadID string)

SetWorkloadID adds the workloadId to the get logs params

func (*GetLogsParams) WithContainerName

func (o *GetLogsParams) WithContainerName(containerName *string) *GetLogsParams

WithContainerName adds the containerName to the get logs params

func (*GetLogsParams) WithContext

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

WithContext adds the context to the get logs params

func (*GetLogsParams) WithFollow

func (o *GetLogsParams) WithFollow(follow *bool) *GetLogsParams

WithFollow adds the follow to the get logs params

func (*GetLogsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get logs params

func (*GetLogsParams) WithInstanceName

func (o *GetLogsParams) WithInstanceName(instanceName string) *GetLogsParams

WithInstanceName adds the instanceName to the get logs params

func (*GetLogsParams) WithLimitBytes

func (o *GetLogsParams) WithLimitBytes(limitBytes *string) *GetLogsParams

WithLimitBytes adds the limitBytes to the get logs params

func (*GetLogsParams) WithPrevious

func (o *GetLogsParams) WithPrevious(previous *bool) *GetLogsParams

WithPrevious adds the previous to the get logs params

func (*GetLogsParams) WithSinceSeconds

func (o *GetLogsParams) WithSinceSeconds(sinceSeconds *string) *GetLogsParams

WithSinceSeconds adds the sinceSeconds to the get logs params

func (*GetLogsParams) WithSinceTime

func (o *GetLogsParams) WithSinceTime(sinceTime *strfmt.DateTime) *GetLogsParams

WithSinceTime adds the sinceTime to the get logs params

func (*GetLogsParams) WithStackID

func (o *GetLogsParams) WithStackID(stackID string) *GetLogsParams

WithStackID adds the stackID to the get logs params

func (*GetLogsParams) WithTailLines

func (o *GetLogsParams) WithTailLines(tailLines *string) *GetLogsParams

WithTailLines adds the tailLines to the get logs params

func (*GetLogsParams) WithTimeout

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

WithTimeout adds the timeout to the get logs params

func (*GetLogsParams) WithTimestamps

func (o *GetLogsParams) WithTimestamps(timestamps *bool) *GetLogsParams

WithTimestamps adds the timestamps to the get logs params

func (*GetLogsParams) WithWorkloadID

func (o *GetLogsParams) WithWorkloadID(workloadID string) *GetLogsParams

WithWorkloadID adds the workloadID to the get logs params

func (*GetLogsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetLogsReader

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

GetLogsReader is a Reader for the GetLogs structure.

func (*GetLogsReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetLogsUnauthorized

type GetLogsUnauthorized struct {
	Payload *workload_models.StackpathapiStatus
}

GetLogsUnauthorized handles this case with default header values.

Returned when an unauthorized request is attempted.

func NewGetLogsUnauthorized

func NewGetLogsUnauthorized() *GetLogsUnauthorized

NewGetLogsUnauthorized creates a GetLogsUnauthorized with default headers values

func (*GetLogsUnauthorized) Error

func (o *GetLogsUnauthorized) Error() string

func (*GetLogsUnauthorized) GetPayload

Jump to

Keyboard shortcuts

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