Documentation ¶
Overview ¶
Package wlm contains types and functions to interact with WorkloadManager cloud APIs.
Index ¶
- func InitializeSQLServerValidation(projectID, instance string) *wlmngr.SqlserverValidation
- func InitializeWriteInsightRequest(sqlservervalidation *wlmngr.SqlserverValidation, instanceID string) *wlmngr.WriteInsightRequest
- func UpdateValidationDetails(sqlservervalidation *wlmngr.SqlserverValidation, ...) *wlmngr.SqlserverValidation
- type MockWlmService
- type WLM
- type WorkloadManagerService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeSQLServerValidation ¶
func InitializeSQLServerValidation(projectID, instance string) *wlmngr.SqlserverValidation
InitializeSQLServerValidation initializes and returns SqlserverValidation.
func InitializeWriteInsightRequest ¶
func InitializeWriteInsightRequest(sqlservervalidation *wlmngr.SqlserverValidation, instanceID string) *wlmngr.WriteInsightRequest
InitializeWriteInsightRequest initializes and returns WriteInsightRequest.
func UpdateValidationDetails ¶
func UpdateValidationDetails(sqlservervalidation *wlmngr.SqlserverValidation, details []sqlserverutils.MetricDetails) *wlmngr.SqlserverValidation
UpdateValidationDetails update ValidationDetails in SqlserverValidation.
Types ¶
type MockWlmService ¶
type MockWlmService struct { MockError bool MockHTTPCode int Request *workloadmanager.WriteInsightRequest }
MockWlmService mocks WorkloadManagerService for testing usage.
func (*MockWlmService) InitializeMockWriteInsightRequest ¶
func (m *MockWlmService) InitializeMockWriteInsightRequest() *workloadmanager.WriteInsightRequest
InitializeMockWriteInsightRequest mock function.
func (*MockWlmService) SendRequest ¶
func (m *MockWlmService) SendRequest(location string) (*workloadmanager.WriteInsightResponse, error)
SendRequest mock function.
func (*MockWlmService) UpdateRequest ¶
func (m *MockWlmService) UpdateRequest(writeInsightRequest *workloadmanager.WriteInsightRequest)
UpdateRequest mock function.
type WLM ¶
type WLM struct { Request *wlmngr.WriteInsightRequest // contains filtered or unexported fields }
WLM struct which contains workloadmanager service.
func NewWorkloadManager ¶
NewWorkloadManager creates new WLM and it return non-nil error if any error was caught.
func (*WLM) SendRequest ¶
func (wlm *WLM) SendRequest(location string) (*wlmngr.WriteInsightResponse, error)
SendRequest sends request to wlmngr.
func (*WLM) UpdateRequest ¶
func (wlm *WLM) UpdateRequest(writeInsightRequest *wlmngr.WriteInsightRequest)
UpdateRequest updates WLM request.
type WorkloadManagerService ¶
type WorkloadManagerService interface { SendRequest(string) (*wlmngr.WriteInsightResponse, error) UpdateRequest(*wlmngr.WriteInsightRequest) }
WorkloadManagerService the interface of WLM.