client

package
v0.9.3 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: 0

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