/
env.go
35 lines (30 loc) · 1.04 KB
/
env.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
27
28
29
30
31
32
33
34
35
// 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-present Datadog, Inc.
package env
import (
"github.com/n9e/n9e-agentd/staging/datadog-agent/pkg/compliance/eval"
"github.com/n9e/n9e-agentd/staging/datadog-agent/pkg/compliance/event"
)
// Env provides environment methods for compliance checks execution
type Env interface {
Clients
Configuration
Reporter() event.Reporter
}
// Clients provides an abstraction for accessing various clients needed by checks
type Clients interface {
DockerClient() DockerClient
AuditClient() AuditClient
KubeClient() KubeClient
}
// Configuration provides an abstraction for various environment methods used by checks
type Configuration interface {
Hostname() string
EtcGroupPath() string
NormalizeToHostRoot(path string) string
RelativeToHostRoot(path string) string
EvaluateFromCache(e eval.Evaluatable) (interface{}, error)
IsLeader() bool
}