mock_cqos

package
v0.0.0-...-a69e935 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

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

GetHostMetrics mocks the getting the metrics of all hosts in the cluster.

func (*ServiceHandler) GetServicesImpacted

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL