logs

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(client *gophercloud.ServiceClient, scalingGroupId string, opts ListOptsBuilder) pagination.Pager

func ListURL

func ListURL(c *gophercloud.ServiceClient, scalingGroupId string) string

Types

type ListOpts

type ListOpts struct {
	// Specifies the start time for querying scaling action logs. The
	// format of the start time is yyyy-MM-ddThh:mm:ssZ.
	StartTime string `q:"start_time"`

	// Specifies the end time for querying scaling action logs. The
	// format of the end time is yyyy-MM-ddThh:mm:ssZ.
	EndTime string `q:"end_time"`

	// Specifies the start line number. The default value is 0.
	StartNumber int `q:"start_number"`

	// Specifies the total number of query records. The default value
	// is 20 and the maximum value is 100.
	Limit int `q:"limit"`
}

func (ListOpts) ToListQuery

func (opts ListOpts) ToListQuery() (string, error)

type ListOptsBuilder

type ListOptsBuilder interface {
	ToListQuery() (string, error)
}

type ListResponse

type ListResponse struct {
	// Specifies the total number of query records.
	TotalNumber int `json:"total_number"`

	// Specifies the start line number.
	StartNumber int `json:"start_number"`

	// Specifies the number of query records.
	Limit int `json:"limit"`

	// Specifies the scaling action log list.
	ScalingActivityLog []ScalingActivityLog `json:"scaling_activity_log"`
}

func ExtractLogs

func ExtractLogs(r pagination.Page) (ListResponse, error)

ExtractLogs is a function that takes a ListResult and returns the information.

type LogPage

type LogPage struct {
	pagination.NumberPageBase
}

func (LogPage) IsEmpty

func (r LogPage) IsEmpty() (bool, error)

IsEmpty returns true if a ListResult contains no services.

func (LogPage) LastStartNumber

func (r LogPage) LastStartNumber() (string, error)

LastStartNumber returns the last service in a ListResult.

type ScalingActivityLog

type ScalingActivityLog struct {
	// Specifies the status of the scaling action.SUCCESS: indicates
	// the scaling action is successfully performed.FAIL: indicates the action failed to be
	// performed.DOING: indicates the scaling action is being performed.
	Status string `json:"status"`

	// Specifies the start time of the scaling action. The time format
	// must comply with UTC.
	StartTime string `json:"start_time"`

	// Specifies the end time of the scaling action. The time format
	// must comply with UTC.
	EndTime string `json:"end_time"`

	// Specifies the scaling action log ID.
	ID string `json:"id"`

	// Specifies the name list of the instances removed from the AS
	// group after the scaling action is complete. The instance names are separated by
	// commas (,).
	InstanceRemovedList string `json:"instance_removed_list"`

	// Specifies the name list of the instances deleted from the AS
	// group and deleted after the scaling action is complete. The instance names are
	// separated by commas (,).
	InstanceDeletedList string `json:"instance_deleted_list"`

	// Specifies the name list of the instances added to the AS group
	// after the scaling action is complete. The instance names are separated by commas
	// (,).
	InstanceAddedList string `json:"instance_added_list"`

	// Specifies the number of added or deleted instances during the
	// scaling.
	ScalingValue int `json:"scaling_value"`

	// Specifies the description of the scaling action.
	Description string `json:"description"`

	// Specifies the number of instances in the AS group.
	InstanceValue int `json:"instance_value"`

	// Specifies the expected number of instances in the scaling
	// action.
	DesireValue int `json:"desire_value"`
}

Jump to

Keyboard shortcuts

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