client

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountMultiplex added in v0.0.2

func AccountMultiplex(meta schema.ClientMeta) []schema.ClientMeta

func Configure

func Configure(logger hclog.Logger, config interface{}) (schema.ClientMeta, diag.Diagnostics)

func ResolveAccountName added in v0.0.2

func ResolveAccountName(_ context.Context, meta schema.ClientMeta, r *schema.Resource, col schema.Column) error

Types

type Account

type Account struct {
	Name   string `hcl:",label"`
	APIKey string `hcl:"api_key"`
	AppKey string `hcl:"app_key"`
	APIUrl string `hcl:"api_url,optional"`
}

type Client

type Client struct {
	Accounts       []DDAccount
	AccountConfigs []Account
	// this is set by the table client multiplexer
	MultiPlexedAccount DDAccount
	// contains filtered or unexported fields
}

func (*Client) Logger

func (c *Client) Logger() hclog.Logger

type Config

type Config struct {
	Accounts    []Account `hcl:"accounts,block"`
	DatdogDebug bool      `hcl:"datadog_debug,optional"`
	MaxRetries  int       `hcl:"max_retries,optional" default:"10"`
	MaxBackoff  int       `hcl:"max_backoff,optional" default:"30"`
}

func (Config) Example

func (c Config) Example() string

type DDAccount

type DDAccount struct {
	V1Context context.Context
	V2Context context.Context
	V1Config  datadogv1.Configuration
	V2Config  datadogv2.Configuration
	Name      string
}

Jump to

Keyboard shortcuts

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