func GetPayload(ctx context.Context, hostnameData util.HostnameData) *Payload {
	cp := common.GetPayload(hostnameData.Hostname)
	hp := host.GetPayload(ctx, hostnameData)
	rp := resources.GetPayload(hostnameData.Hostname)

	p := &Payload{
		CommonPayload: CommonPayload{*cp},
		HostPayload:   HostPayload{*hp},
	}

	if rp != nil {
		p.ResourcesPayload = ResourcesPayload{*rp}
	}

	if config.Datadog.GetBool("enable_gohai") {
		p.GohaiPayload = GohaiPayload{MarshalledGohaiPayload{*gohai.GetPayload()}}
	}

	return p
}
// GetPayload returns the complete metadata payload as seen in Agent v5
GetPayload returns the complete metadata payload as seen in Agent v5
// GetPayload returns the complete metadata payload as seen in Agent v5
func GetPayload(ctx context.Context, hostnameData util.HostnameData) *Payload {
	cp := common.GetPayload(hostnameData.Hostname)
	hp := host.GetPayload(ctx, hostnameData)
	rp := resources.GetPayload(hostnameData.Hostname)
	p := &Payload{
		CommonPayload: CommonPayload{*cp},
		HostPayload:   HostPayload{*hp},
	}
	if rp != nil {
		p.ResourcesPayload = ResourcesPayload{*rp}
	}
	if config.Datadog.GetBool("enable_gohai") {
		p.GohaiPayload = GohaiPayload{MarshalledGohaiPayload{*gohai.GetPayload()}}
	}
	return p
}
func GetPayload ( ctx context . Context , hostnameData util . HostnameData ) * Payload { cp := common . GetPayload ( hostnameData . Hostname ) hp := host . GetPayload ( ctx , hostnameData ) rp := resources . GetPayload ( hostnameData . Hostname ) p := & Payload { CommonPayload : CommonPayload { * cp } , HostPayload : HostPayload { * hp } , } if rp != nil { p . ResourcesPayload = ResourcesPayload { * rp } } if config . Datadog . GetBool ( " " ) { p . GohaiPayload = GohaiPayload { MarshalledGohaiPayload { * gohai . GetPayload ( ) } } } return p }
GetPayload returns the complete metadata payload as seen in Agent v5
GetPayload returns the complete metadata payload as seen in Agent v5