inventory

package
v4.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

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) Len

func (i *Inventory) Len() int

Len returns the number of elements stored in Inventory.

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, updating if already exists an item with the same key 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