limits

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package limits shows rate and limit information for a project you authorized for.

Example to Retrieve Limits

limits, err := limits.Get(blockStorageClient).Extract()
if err != nil {
    panic(err)
}

fmt.Printf("%+v\n", limits)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Absolute

type Absolute struct {
	// MaxTotalVolumes is the maximum number of volumes.
	MaxTotalVolumes int `json:"maxTotalVolumes"`

	// MaxTotalSnapshots is the maximum number of snapshots.
	MaxTotalSnapshots int `json:"maxTotalSnapshots"`

	// MaxTotalVolumeGigabytes is the maximum total amount of volumes, in gibibytes (GiB).
	MaxTotalVolumeGigabytes int `json:"maxTotalVolumeGigabytes"`

	// MaxTotalBackups is the maximum number of backups.
	MaxTotalBackups int `json:"maxTotalBackups"`

	// MaxTotalBackupGigabytes is the maximum total amount of backups, in gibibytes (GiB).
	MaxTotalBackupGigabytes int `json:"maxTotalBackupGigabytes"`

	// TotalVolumesUsed is the total number of volumes used.
	TotalVolumesUsed int `json:"totalVolumesUsed"`

	// TotalGigabytesUsed is the total number of gibibytes (GiB) used.
	TotalGigabytesUsed int `json:"totalGigabytesUsed"`

	// TotalSnapshotsUsed the total number of snapshots used.
	TotalSnapshotsUsed int `json:"totalSnapshotsUsed"`

	// TotalBackupsUsed is the total number of backups used.
	TotalBackupsUsed int `json:"totalBackupsUsed"`

	// TotalBackupGigabytesUsed is the total number of backups gibibytes (GiB) used.
	TotalBackupGigabytesUsed int `json:"totalBackupGigabytesUsed"`
}

Absolute is a struct that contains the current resource usage and limits of a project.

type GetResult

type GetResult struct {
	gophercloud.Result
}

GetResult is the response from a Get operation. Call its Extract method to interpret it as an Absolute.

func Get

func Get(client *gophercloud.ServiceClient) (r GetResult)

Get returns the limits about the currently scoped tenant.

func (GetResult) Extract

func (r GetResult) Extract() (*Limits, error)

Extract interprets a limits result as a Limits.

type Limit

type Limit struct {
	Verb          string `json:"verb"`
	NextAvailable string `json:"next-available"`
	Unit          string `json:"unit"`
	Value         int    `json:"value"`
	Remaining     int    `json:"remaining"`
}

Limit struct contains Limit values for the Rate struct

type Limits

type Limits struct {
	// Absolute contains the limits and usage information.
	// An absolute limit value of -1 indicates that the absolute limit for the item is infinite.
	Absolute Absolute `json:"absolute"`
	// Rate contains rate-limit volume copy bandwidth, used to mitigate slow down of data access from the instances.
	Rate []Rate `json:"rate"`
}

Limits is a struct that contains the response of a limit query.

type Rate

type Rate struct {
	Regex string  `json:"regex"`
	URI   string  `json:"uri"`
	Limit []Limit `json:"limit"`
}

Rate is a struct that contains the rate-limit volume copy bandwidth, used to mitigate slow down of data access from the instances.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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