github.com/jingruilea/kubeedge@v1.2.0-beta.0.0.20200410162146-4bb8902b3879/edgemesh/pkg/plugin/panel/panel.go (about)

     1  package panel
     2  
     3  import (
     4  	"github.com/go-chassis/go-chassis/control"
     5  	"github.com/go-chassis/go-chassis/core/config/model"
     6  	"github.com/go-chassis/go-chassis/core/invocation"
     7  	"github.com/go-chassis/go-chassis/third_party/forked/afex/hystrix-go/hystrix"
     8  )
     9  
    10  type EdgePanel struct {
    11  }
    12  
    13  func (ep *EdgePanel) GetCircuitBreaker(inv invocation.Invocation, serviceType string) (string, hystrix.CommandConfig) {
    14  	return "", hystrix.CommandConfig{}
    15  }
    16  
    17  func (ep *EdgePanel) GetLoadBalancing(inv invocation.Invocation) control.LoadBalancingConfig {
    18  	return control.LoadBalancingConfig{}
    19  }
    20  func (ep *EdgePanel) GetRateLimiting(inv invocation.Invocation, serviceType string) control.RateLimitingConfig {
    21  	return control.RateLimitingConfig{}
    22  }
    23  func (ep *EdgePanel) GetFaultInjection(inv invocation.Invocation) model.Fault {
    24  	return model.Fault{}
    25  }
    26  func (ep *EdgePanel) GetEgressRule() []control.EgressConfig {
    27  	return []control.EgressConfig{}
    28  }
    29  
    30  // TODO Remove the init method, because it will cause invalid logs to be printed when the program is running @kadisi
    31  // init install Plugin
    32  func init() {
    33  	control.InstallPlugin("edge", func(options control.Options) control.Panel {
    34  		return &EdgePanel{}
    35  	})
    36  
    37  }