Documentation ¶
Index ¶
- type Config
- type ServiceHandler
- func (h *ServiceHandler) GetHostMetrics(ctx context.Context, in *cqos.GetHostMetricsRequest) (*cqos.GetHostMetricsResponse, error)
- func (h *ServiceHandler) GetServicesImpacted(ctx context.Context, in *cqos.GetServicesImpactedRequest) (*cqos.GetServicesImpactedResponse, error)
- func (h *ServiceHandler) UpdateHostLoad(hostLoad map[string]int32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // gRPC port which Cqos advisor Server is listening on GRPCPort int `yaml:"grpc_port"` // http port which Cqos advisor Server is listening on HTTPPort int `yaml:"http_port"` }
Config contains Cqos advisor server specific configuration
type ServiceHandler ¶
type ServiceHandler struct {
// contains filtered or unexported fields
}
ServiceHandler mocks the implementation for QoSAdvisorService this is for testing purpose
func NewServiceHandler ¶
func NewServiceHandler( d *yarpc.Dispatcher, hostLoad map[string]int32, ) *ServiceHandler
NewServiceHandler creates a new ServiceHandler.
func (*ServiceHandler) GetHostMetrics ¶
func (h *ServiceHandler) GetHostMetrics( ctx context.Context, in *cqos.GetHostMetricsRequest) (*cqos.GetHostMetricsResponse, error)
GetHostMetrics mocks the getting the metrics of all hosts in the cluster.
func (*ServiceHandler) GetServicesImpacted ¶
func (h *ServiceHandler) GetServicesImpacted( ctx context.Context, in *cqos.GetServicesImpactedRequest) (*cqos.GetServicesImpactedResponse, error)
GetServicesImpacted mocks getting all service instances in the cluster along with associated CPU and memory metrics. leave it blank now, since our test does not need this part yet.
func (*ServiceHandler) UpdateHostLoad ¶
func (h *ServiceHandler) UpdateHostLoad( hostLoad map[string]int32)
Click to show internal directories.
Click to hide internal directories.