forked from cozystack/cozy-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdummy.go
More file actions
47 lines (36 loc) · 1.33 KB
/
dummy.go
File metadata and controls
47 lines (36 loc) · 1.33 KB
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
45
46
47
package proxy
import (
"fmt"
corev1 "k8s.io/api/core/v1"
)
type DummyProxyProcessor struct{}
func (d *DummyProxyProcessor) InitRules() error {
fmt.Println("InitRules called")
return nil
}
func (d *DummyProxyProcessor) EnsureRules(SvcIP, PodIP string) error {
fmt.Printf("EnsureRules called with SvcIP: %s, PodIP: %s\n", SvcIP, PodIP)
return nil
}
func (d *DummyProxyProcessor) DeleteRules(SvcIP, PodIP string) error {
fmt.Printf("DeleteRules called with SvcIP: %s, PodIP: %s\n", SvcIP, PodIP)
return nil
}
func (d *DummyProxyProcessor) CleanupRules(KeepMap map[string]string) error {
fmt.Println("CleanupRules called with KeepMap:", KeepMap)
return nil
}
func (d *DummyProxyProcessor) EnsurePortFilter(SvcIP, PodIP string, Ports []corev1.ServicePort) error {
fmt.Printf("EnsurePortFilter called with SvcIP: %s, PodIP: %s, Ports: %+v\n", SvcIP, PodIP, Ports)
return nil
}
func (d *DummyProxyProcessor) DeletePortFilter(SvcIP, PodIP string) error {
fmt.Printf("DeletePortFilter called with SvcIP: %s, PodIP: %s\n", SvcIP, PodIP)
return nil
}
func (d *DummyProxyProcessor) CleanupPortFilters(keep map[string]PortFilterEntry) error {
fmt.Printf("CleanupPortFilters called with %d entries\n", len(keep))
return nil
}
// Compile-time assertion that DummyProxyProcessor satisfies ProxyProcessor.
var _ ProxyProcessor = (*DummyProxyProcessor)(nil)