inventoryagentimpl

package
v0.0.0-...-0218309 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Overview

Package inventoryagentimpl implements a component to generate the 'datadog_agent' metadata payload for inventory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MockModule

func MockModule() fxutil.Module

MockModule defines the fx options for the mock component.

Usage:

fxutil.Test[dependencies](
   t,
   inventoryagentimpl.MockModule(),
)

func Module

func Module() fxutil.Module

Module defines the fx options for this component.

Types

type MockProvides

type MockProvides struct {
	fx.Out

	Comp iainterface.Component
}

MockProvides is the mock component output

type Payload

type Payload struct {
	Hostname  string        `json:"hostname"`
	Timestamp int64         `json:"timestamp"`
	Metadata  agentMetadata `json:"agent_metadata"`
	UUID      string        `json:"uuid"`
}

Payload handles the JSON unmarshalling of the metadata payload

func (*Payload) MarshalJSON

func (p *Payload) MarshalJSON() ([]byte, error)

MarshalJSON serialization a Payload to JSON

func (*Payload) SplitPayload

func (p *Payload) SplitPayload(_ int) ([]marshaler.AbstractMarshaler, error)

SplitPayload implements marshaler.AbstractMarshaler#SplitPayload.

In this case, the payload can't be split any further.

Jump to

Keyboard shortcuts

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