client

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client wraps the Datadog API client

func New

func New(cfg *config.Config) (*Client, error)

New creates a new Datadog API client Authentication priority:

  1. OAuth2 tokens (if available and valid)
  2. API keys (DD_API_KEY and DD_APP_KEY)

func (*Client) API

func (c *Client) API() *datadog.APIClient

API returns the API client

func (*Client) Config

func (c *Client) Config() *config.Config

Config returns the client configuration

func (*Client) Context

func (c *Client) Context() context.Context

Context returns the client context

func (*Client) RawRequest

func (c *Client) RawRequest(method, path string, body io.Reader) (*http.Response, error)

RawRequest makes an HTTP request with proper authentication headers. This is used for APIs not covered by the typed datadog-api-client-go library.

func (*Client) V1

func (c *Client) V1() *datadog.APIClient

V1 returns the v1 API client

func (*Client) V2

func (c *Client) V2() *datadog.APIClient

V2 returns the v2 API client

Jump to

Keyboard shortcuts

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