inventory

package
v3.8.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 10

Documentation

Index

Constants

View Source
const (
	MaxKeyLen = 375
)

Limits

Variables

This section is empty.

Functions

This section is empty.

Types

type Inventory

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

Inventory is the data type for inventory data produced by an integration data source and emitted to the agent's inventory data store.

func New

func New() *Inventory

New creates new inventory.

func (Inventory) Item

func (i Inventory) Item(key string) (item Item, exists bool)

Item returns stored item

func (Inventory) Items

func (i Inventory) Items() Items

Items returns all stored items

func (Inventory) MarshalJSON

func (i Inventory) MarshalJSON() ([]byte, error)

MarshalJSON Marshals the items map into a JSON

func (Inventory) SetItem

func (i Inventory) SetItem(key string, field string, value interface{}) error

SetItem stores a value into the inventory, key is limited to 375 characters.

type Item

type Item map[string]interface{}

Item ...

type Items

type Items map[string]Item

Items ...

Jump to

Keyboard shortcuts

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