Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonPayload ¶
CommonPayload wraps Payload from the common package
type GohaiPayload ¶
type GohaiPayload struct {
Marshalled MarshalledGohaiPayload `json:"gohai"`
}
GohaiPayload wraps Payload from the gohai package As weird as it sounds, in the v5 payload the value of the "gohai" field is a JSON-formatted string. So this struct contains a MarshalledGohaiPayload which will be marshalled as a JSON-formatted string.
type HostPayload ¶
HostPayload wraps Payload from the host package
type MarshalledGohaiPayload ¶
type MarshalledGohaiPayload struct {
// contains filtered or unexported fields
}
MarshalledGohaiPayload contains the marshalled payload
func (MarshalledGohaiPayload) MarshalJSON ¶
func (m MarshalledGohaiPayload) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface. It marshals the gohai struct twice (to a string) to comply with the v5 payload format
func (*MarshalledGohaiPayload) UnmarshalJSON ¶
func (m *MarshalledGohaiPayload) UnmarshalJSON(bytes []byte) error
UnmarshalJSON implements the json.Unmarshaler interface. Unmarshals the passed bytes twice (first to a string, then to gohai.Gohai)
type Payload ¶
type Payload struct { CommonPayload HostPayload ResourcesPayload GohaiPayload }
Payload handles the JSON unmarshalling of the metadata payload
func GetPayload ¶
func GetPayload(hostnameData util.HostnameData) *Payload
GetPayload returns the complete metadata payload as seen in Agent v5
func (*Payload) MarshalJSON ¶
MarshalJSON serialization a Payload to JSON
func (*Payload) MarshalSplitCompress ¶
func (p *Payload) MarshalSplitCompress(bufferContext *marshaler.BufferContext) ([]*[]byte, error)
MarshalSplitCompress not implemented
type ResourcesPayload ¶
ResourcesPayload wraps Payload from the resources package