-
Notifications
You must be signed in to change notification settings - Fork 1
/
noop.go
44 lines (35 loc) · 1.09 KB
/
noop.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
36
37
38
39
40
41
42
43
44
package drivers
import (
"context"
"sigs.k8s.io/controller-runtime/pkg/client"
netconv1alpha1 "github.com/janog-netcon/netcon-problem-management-subsystem/api/v1alpha1"
)
type NoopProblemEnvironmentDriver struct{}
var _ ProblemEnvironmentDriver = &NoopProblemEnvironmentDriver{}
func NewNoopProblemEnvironmentDriver() *NoopProblemEnvironmentDriver {
return &NoopProblemEnvironmentDriver{}
}
// Check implements ProblemEnvironmentDriver
func (*NoopProblemEnvironmentDriver) Check(
ctx context.Context,
client client.Client,
problemEnvironment netconv1alpha1.ProblemEnvironment,
) (ProblemEnvironmentStatus, []netconv1alpha1.ContainerStatus) {
return StatusDeployed, nil
}
// Deploy implements ProblemEnvironmentDriver
func (*NoopProblemEnvironmentDriver) Deploy(
ctx context.Context,
client client.Client,
problemEnvironment netconv1alpha1.ProblemEnvironment,
) error {
return nil
}
// Destroy implements ProblemEnvironmentDriver
func (*NoopProblemEnvironmentDriver) Destroy(
ctx context.Context,
client client.Client,
problemEnvironment netconv1alpha1.ProblemEnvironment,
) error {
return nil
}