ecsmetadata

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Overview

Package ecsmetadata queries ECS Metadata Server for ECS task metrics. This package is currently experimental and is subject to change.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// HTTClient is the client to use when making HTTP requests when set.
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(endpoint string) *Client

NewClient returns a new Client. endpoint is the metadata server endpoint.

func NewClientFromEnvironment added in v0.1.1

func NewClientFromEnvironment() (*Client, error)

NewClientFromEnvironment is like NewClient but endpoint is discovered from the environment.

func (*Client) RetrieveTaskMetadata

func (c *Client) RetrieveTaskMetadata(ctx context.Context) (*tmdsv4.TaskResponse, error)

func (*Client) RetrieveTaskStats

func (c *Client) RetrieveTaskStats(ctx context.Context) (map[string]*tmdsv4.StatsResponse, error)

Jump to

Keyboard shortcuts

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