forked from DataDog/datadog-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
payload.go
24 lines (18 loc) · 750 Bytes
/
payload.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Unless explicitly stated otherwise all files in this repository are licensed
// under the Apache License Version 2.0.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-2020 Datadog, Inc.
package externalhost
/*
The payload looks like this when SOURCE_TYPE is `vsphere`:
external_host_metadata = [
["hostname1", {"vsphere": ["foo:val1", "bar:val1"]}],
["hostname2", {"vsphere": ["foo:val2", "bar:val2"]}]
]
*/
// ExternalTags maps SOURCE_TYPE -> list of tags, exported to ease testing
type ExternalTags map[string][]string
// hostname -> list of externalTags
type hostTags []interface{}
// Payload handles the JSON unmarshalling of the external host tags payload
type Payload []hostTags