connectionsapi

package
v3.15.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound     = fmt.Errorf("not found")
	ErrUnauthorized = fmt.Errorf("request not authorized for stack")
)

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(authToken string, rawURL string, client *http.Client, userAgent string, defaultHeaders map[string]string) (*Client, error)

func (*Client) CreateMetricsEndpointScrapeJob

func (c *Client) CreateMetricsEndpointScrapeJob(ctx context.Context, stackID, jobName string, jobData MetricsEndpointScrapeJob) (MetricsEndpointScrapeJob, error)

func (*Client) DeleteMetricsEndpointScrapeJob

func (c *Client) DeleteMetricsEndpointScrapeJob(ctx context.Context, stackID, jobName string) error

func (*Client) GetMetricsEndpointScrapeJob

func (c *Client) GetMetricsEndpointScrapeJob(ctx context.Context, stackID, jobName string) (MetricsEndpointScrapeJob, error)

func (*Client) UpdateMetricsEndpointScrapeJob

func (c *Client) UpdateMetricsEndpointScrapeJob(ctx context.Context, stackID, jobName string, jobData MetricsEndpointScrapeJob) (MetricsEndpointScrapeJob, error)

type MetricsEndpointScrapeJob

type MetricsEndpointScrapeJob struct {
	Enabled                     bool   `json:"enabled"`
	AuthenticationMethod        string `json:"authentication_method"`
	AuthenticationBearerToken   string `json:"bearer_token,omitempty"`
	AuthenticationBasicUsername string `json:"basic_username,omitempty"`
	AuthenticationBasicPassword string `json:"basic_password,omitempty"`
	URL                         string `json:"url"`
	ScrapeIntervalSeconds       int64  `json:"scrape_interval_seconds"`
}

Jump to

Keyboard shortcuts

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