-
Notifications
You must be signed in to change notification settings - Fork 51
/
runtime.go
26 lines (23 loc) · 953 Bytes
/
runtime.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
25
26
package runtime
import "go.aporeto.io/trireme-lib/controller/constants"
// Configuration is configuration parameters that can be safely updated
// for the controller after it is started
type Configuration struct {
// TCPTargetNetworks is the set of networks that host Trireme.
TCPTargetNetworks []string
// UDPTargetNetworks is the set of UDP networks that host Trireme.
UDPTargetNetworks []string
// ExcludedNetworks is the list of networks that must be excxluded from any enforcement.
ExcludedNetworks []string
// LogLevel sets loglevel.
LogLevel constants.LogLevel
}
// DeepCopy copies the configuration and avoids locking issues.
func (c *Configuration) DeepCopy() *Configuration {
return &Configuration{
TCPTargetNetworks: append([]string{}, c.TCPTargetNetworks...),
UDPTargetNetworks: append([]string{}, c.UDPTargetNetworks...),
ExcludedNetworks: append([]string{}, c.ExcludedNetworks...),
LogLevel: c.LogLevel,
}
}