Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Params ¶
type Params struct {
// Disabled determines if the resources payload will be sent. When disabled, the Get method is still available.
Disabled bool
}
Params defines the parameters for the metadata resources component.
type Provides ¶
Provides defines the output of the resources metadata component.
func NewComponent ¶
NewComponent creates a new resources metadata component.
type Requires ¶
type Requires struct {
compdef.In
Params *Params `optional:"true"`
Log log.Component
Config config.Component
Serializer serializer.MetricSerializer
Hostname hostnameinterface.Component
}
Requires defines the dependencies for the resources metadata component.
Resources is enabled by default for most binaries. But even for binaries where we don't want to send the 'resources' paylod, like dogstatsd, we still need the resources Component. This is because the resources data is embedded in other metadata payload like 'host'. This means that even if resources is disabled it might be required in the build in order for the `Get` method to be available.
This is why we have a Params struct for resources. It's `optional` so most of the binaries don't have to supply a Params struct but only need to import the metadata.Bundle.