Documentation
¶
Overview ¶
Package workloadmanager collects workload manager metrics and sends them to Data Warehouse.
Index ¶
- Constants
- func QuietSendDataInsight(ctx context.Context, params SendDataInsightParams) (*wlm.WriteInsightResponse, error)
- func SendDataInsight(ctx context.Context, params SendDataInsightParams) (*wlm.WriteInsightResponse, error)
- type ConfigFileReader
- type SendDataInsightParams
- type Service
- type WLMWriter
- type WorkloadMetrics
- type WorkloadType
Constants ¶
const MetricOverridePath = "/etc/google-cloud-workload-agent/wlmmetricoverride.yaml"
MetricOverridePath is the path to the metric override file.
Variables ¶
This section is empty.
Functions ¶
func QuietSendDataInsight ¶
func QuietSendDataInsight(ctx context.Context, params SendDataInsightParams) (*wlm.WriteInsightResponse, error)
QuietSendDataInsight sends a data insight to Data Warehouse without logging. This is used for the data warehouse activation check.
func SendDataInsight ¶
func SendDataInsight(ctx context.Context, params SendDataInsightParams) (*wlm.WriteInsightResponse, error)
SendDataInsight sends a data insight to Data Warehouse.
Types ¶
type ConfigFileReader ¶
type ConfigFileReader func(string) (io.ReadCloser, error)
ConfigFileReader is a function that reads a config file.
type SendDataInsightParams ¶
type SendDataInsightParams struct {
WLMetrics WorkloadMetrics
CloudProps *cpb.CloudProperties
WLMService WLMWriter
}
SendDataInsightParams defines the set of parameters required to call SendDataInsight
type Service ¶
type Service struct {
Config *cpb.Configuration
Client WLMWriter
}
Service is used to collect workload manager metrics and send them to Data Warehouse.
type WLMWriter ¶
type WLMWriter interface {
WriteInsightAndGetResponse(project, location string, writeInsightRequest *dwpb.WriteInsightRequest) (*wlm.WriteInsightResponse, error)
}
WLMWriter is an interface for writing insights to Data Warehouse.
type WorkloadMetrics ¶
type WorkloadMetrics struct {
WorkloadType WorkloadType
Metrics map[string]string
}
WorkloadMetrics is a struct that collect data from override configuration file for testing purposes. Future enhancements will include the collection of actual WLM metrics.
type WorkloadType ¶
type WorkloadType string
WorkloadType is an enum for the type of workload.
const ( // UNKNOWN workload type. UNKNOWN WorkloadType = "UNKNOWN" // ORACLE workload type. ORACLE WorkloadType = "ORACLE" // MYSQL workload type. MYSQL WorkloadType = "MYSQL" // REDIS workload type. REDIS WorkloadType = "REDIS" // POSTGRES workload type. POSTGRES WorkloadType = "POSTGRES" // MONGODB workload type. MONGODB WorkloadType = "MONGODB" )