hostimpl

package
v0.0.0-...-3ec880f Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package hostimpl implements a component to generate the 'host' metadata payload (also known as "v5").

Package hostimpl implements a component to generate the 'host' metadata payload (also known as "v5").

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Payload

type Payload struct {
	utils.CommonPayload
	utils.Payload

	ResourcesPayload interface{} `json:"resources,omitempty"`
	GohaiPayload     string      `json:"gohai"`
}

Payload handles the JSON unmarshalling of the metadata payload

func (*Payload) MarshalJSON

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

MarshalJSON serialization a Payload to JSON

type Provides

type Provides struct {
	compdef.Out

	Comp                 hostComp.Component
	MetadataProvider     runnerdef.Provider
	FlareProvider        flaretypes.Provider
	StatusHeaderProvider status.HeaderInformationProvider
	Endpoint             api.AgentEndpointProvider
	GohaiEndpoint        api.AgentEndpointProvider
}

Provides defines the output of the host metadata component

func NewComponent

func NewComponent(deps Requires) Provides

NewComponent creates a new host metadata component

type Requires

type Requires struct {
	compdef.In

	Log        log.Component
	Config     config.Component
	Resources  resources.Component
	Serializer serializer.MetricSerializer
	Hostname   hostnameinterface.Component
}

Requires defines the dependencies for the host metadata component

type StatusProvider

type StatusProvider struct {
	Config   config.Component
	Hostname hostnameinterface.Component
}

StatusProvider implements the status provider interface

func (StatusProvider) HTML

func (p StatusProvider) HTML(_ bool, buffer io.Writer) error

HTML renders the html output

func (StatusProvider) Index

func (p StatusProvider) Index() int

Index returns the index

func (StatusProvider) JSON

func (p StatusProvider) JSON(_ bool, stats map[string]interface{}) error

JSON populates the status map

func (StatusProvider) Name

func (p StatusProvider) Name() string

Name returns the name

func (StatusProvider) Text

func (p StatusProvider) Text(_ bool, buffer io.Writer) error

Text renders the text output

Directories

Path Synopsis
Package hosttags provides access to host tags
Package hosttags provides access to host tags
Package utils generate host metadata payloads ready to be sent.
Package utils generate host metadata payloads ready to be sent.

Jump to

Keyboard shortcuts

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