metrics

package
v0.45.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoscalerSlotsRecommendation

type AutoscalerSlotsRecommendation struct {
	ProjectID        string    `json:"project_id"`
	RecommendedSlots int       `json:"recommended_slots"`
	UpdatedOn        time.Time `json:"updated_on"`
}

AutoscalerSlotsRecommendation represents a recommendation for the number of slots to use for a project.

type Client

type Client struct {
	RuntimeHost string
	InstanceID  string
	AccessToken string
}

It can be used for such use cases as autoscaling, health checks, breached quotas, and usage calculations for billing.

func NewClient

func NewClient(runtimeHost, instanceID, accessToken string) *Client

NewClient creates a new metrics project client. It must be re-created after the provided access token expires. TODO: Move minting and refresh of the access token to the client.

func (*Client) AutoscalerSlotsRecommendations

func (c *Client) AutoscalerSlotsRecommendations(ctx context.Context, limit, offset int) ([]AutoscalerSlotsRecommendation, error)

AutoscalerSlotsRecommendations invokes the "autoscaler-slots-recommendations" API endpoint to get a list of recommendations for the number of slots to use for projects.

Jump to

Keyboard shortcuts

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