client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2022 License: MPL-2.0 Imports: 8 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 `yaml:"name" hcl:",label"`
	APIKey string `yaml:"api_key" hcl:"api_key"`
	AppKey string `yaml:"app_key" hcl:"app_key"`
	APIUrl string `yaml:"api_url,omitempty" 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"`
	// contains filtered or unexported fields
}

func NewConfig added in v0.1.0

func NewConfig(f cqproto.ConfigFormat) *Config

func (Config) Example

func (c Config) Example() string

func (Config) Format added in v0.1.0

func (c Config) Format() cqproto.ConfigFormat

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