forked from kubeedge/kubeedge
/
panel.go
36 lines (31 loc) · 1.16 KB
/
panel.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
package panel
import (
"github.com/go-chassis/go-chassis/control"
"github.com/go-chassis/go-chassis/core/config/model"
"github.com/go-chassis/go-chassis/core/invocation"
"github.com/go-chassis/go-chassis/third_party/forked/afex/hystrix-go/hystrix"
)
type EdgePanel struct {
}
func (ep *EdgePanel) GetCircuitBreaker(inv invocation.Invocation, serviceType string) (string, hystrix.CommandConfig) {
return "", hystrix.CommandConfig{}
}
func (ep *EdgePanel) GetLoadBalancing(inv invocation.Invocation) control.LoadBalancingConfig {
return control.LoadBalancingConfig{}
}
func (ep *EdgePanel) GetRateLimiting(inv invocation.Invocation, serviceType string) control.RateLimitingConfig {
return control.RateLimitingConfig{}
}
func (ep *EdgePanel) GetFaultInjection(inv invocation.Invocation) model.Fault {
return model.Fault{}
}
func (ep *EdgePanel) GetEgressRule() []control.EgressConfig {
return []control.EgressConfig{}
}
// TODO Remove the init method, because it will cause invalid logs to be printed when the program is running @kadisi
// init install Plugin
func init() {
control.InstallPlugin("edge", func(options control.Options) control.Panel {
return &EdgePanel{}
})
}