client

package module
v0.37.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ProductAPMSampling is the apm sampling product
	ProductAPMSampling = "APM_SAMPLING"
	// ProductCWSDD is the cloud workload security product managed by datadog employees
	ProductCWSDD = "CWS_DD"
)

Variables

View Source
var (
	// ErrNoConfigVersion is returned when a config is missing its version in its custom meta
	ErrNoConfigVersion = errors.New("config has no version in its meta")
)

Functions

This section is empty.

Types

type Client

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

Client is a remoteconfig client

func NewClient

func NewClient(embededRoot []byte, products []string) *Client

NewClient creates a new client

func (*Client) GetConfigs

func (c *Client) GetConfigs(time int64) Configs

GetConfigs returns the current assigned configurations

func (*Client) ID

func (c *Client) ID() string

ID is the ID of the client

func (*Client) State

func (c *Client) State() State

State returns the TUF state of the client

func (*Client) Update

func (c *Client) Update(update Update) error

Update updates the client

type ConfigAPMSamling

type ConfigAPMSamling struct {
	ID      string
	Version uint64
	Config  apmsampling.APMSampling
	// contains filtered or unexported fields
}

ConfigAPMSamling is an apm sampling config

type ConfigCWSDD added in v0.37.0

type ConfigCWSDD struct {
	ID      string
	Version uint64
	Config  []byte
	// contains filtered or unexported fields
}

ConfigCWSDD is a CWS DD config

type Configs

type Configs struct {
	CWSDDConfigs       []ConfigCWSDD
	APMSamplingConfigs []ConfigAPMSamling
	// contains filtered or unexported fields
}

Configs is a list of configs

func (*Configs) Diff

func (c *Configs) Diff(oldConfigs Configs) ConfigsUpdated

Diff compares two config lists and returns which configs got updated

type ConfigsUpdated

type ConfigsUpdated struct {
	APMSampling bool
	CWSDD       bool
}

ConfigsUpdated contains the info about which config got updated

type File

type File struct {
	Path string
	Raw  []byte
}

File is a file

type State

type State struct {
	RootVersion    int64
	TargetsVersion int64
}

State is the TUF state

type Update

type Update struct {
	Roots       [][]byte
	Targets     []byte
	TargetFiles map[string][]byte
}

Update is an update bundle for the client

Directories

Path Synopsis
internal
products

Jump to

Keyboard shortcuts

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