master
go 30 lines 749 Bytes
Raw
1 // Unless explicitly stated otherwise all files in this repository are licensed
2 // under the Apache License Version 2.0.
3 // This product includes software developed at Datadog (https://www.datadoghq.com/).
4
5 package ddprofiledefinition
6
7 import "slices"
8
9 type ProfileConsumer string
10
11 const (
12 ConsumerMetrics ProfileConsumer = "metrics"
13 ConsumerTopology ProfileConsumer = "topology"
14 ConsumerLicensing ProfileConsumer = "licensing"
15 ConsumerBGP ProfileConsumer = "bgp"
16 )
17
18 type ConsumerSet []ProfileConsumer
19
20 func (s ConsumerSet) Clone() ConsumerSet {
21 return slices.Clone(s)
22 }
23
24 func (s ConsumerSet) Contains(consumer ProfileConsumer) bool {
25 return slices.Contains(s, consumer)
26 }
27
28 func (s ConsumerSet) IsEmpty() bool {
29 return len(s) == 0
30 }