v3

package
v0.0.99 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DasClientBuilder

func DasClientBuilder() *http_client.HcHttpClientBuilder

func GenReqDefForChangeSqlSwitch

func GenReqDefForChangeSqlSwitch() *def.HttpRequestDef

func GenReqDefForCreateSpaceAnalysisTask

func GenReqDefForCreateSpaceAnalysisTask() *def.HttpRequestDef

func GenReqDefForDeleteDbUser

func GenReqDefForDeleteDbUser() *def.HttpRequestDef

func GenReqDefForDeleteProcess

func GenReqDefForDeleteProcess() *def.HttpRequestDef

func GenReqDefForExportSlowQueryLogs

func GenReqDefForExportSlowQueryLogs() *def.HttpRequestDef

func GenReqDefForExportSqlStatements

func GenReqDefForExportSqlStatements() *def.HttpRequestDef

func GenReqDefForListApiVersions

func GenReqDefForListApiVersions() *def.HttpRequestDef

func GenReqDefForListDbUsers

func GenReqDefForListDbUsers() *def.HttpRequestDef

func GenReqDefForListInnodbLocks

func GenReqDefForListInnodbLocks() *def.HttpRequestDef

func GenReqDefForListMetadataLocks

func GenReqDefForListMetadataLocks() *def.HttpRequestDef

func GenReqDefForListProcesses

func GenReqDefForListProcesses() *def.HttpRequestDef

func GenReqDefForListSpaceAnalysis

func GenReqDefForListSpaceAnalysis() *def.HttpRequestDef

func GenReqDefForRegisterDbUser

func GenReqDefForRegisterDbUser() *def.HttpRequestDef

func GenReqDefForShowApiVersion

func GenReqDefForShowApiVersion() *def.HttpRequestDef

func GenReqDefForShowDbUser

func GenReqDefForShowDbUser() *def.HttpRequestDef

func GenReqDefForShowQuotas

func GenReqDefForShowQuotas() *def.HttpRequestDef

func GenReqDefForShowSqlExecutionPlan

func GenReqDefForShowSqlExecutionPlan() *def.HttpRequestDef

func GenReqDefForShowSqlExplain added in v0.0.81

func GenReqDefForShowSqlExplain() *def.HttpRequestDef

func GenReqDefForShowSqlSwitchStatus

func GenReqDefForShowSqlSwitchStatus() *def.HttpRequestDef

func GenReqDefForUpdateDbUser

func GenReqDefForUpdateDbUser() *def.HttpRequestDef

Types

type ChangeSqlSwitchInvoker added in v0.0.90

type ChangeSqlSwitchInvoker struct {
	*invoker.BaseInvoker
}

func (*ChangeSqlSwitchInvoker) Invoke added in v0.0.90

type CreateSpaceAnalysisTaskInvoker added in v0.0.90

type CreateSpaceAnalysisTaskInvoker struct {
	*invoker.BaseInvoker
}

func (*CreateSpaceAnalysisTaskInvoker) Invoke added in v0.0.90

type DasClient

type DasClient struct {
	HcClient *http_client.HcHttpClient
}

func NewDasClient

func NewDasClient(hcClient *http_client.HcHttpClient) *DasClient

func (*DasClient) ChangeSqlSwitch

func (c *DasClient) ChangeSqlSwitch(request *model.ChangeSqlSwitchRequest) (*model.ChangeSqlSwitchResponse, error)

ChangeSqlSwitch 开启/关闭全量SQL、慢SQL开关

打开或者关闭DAS收集全量SQL开关,开启后,实例的性能损耗在5%以内。开启全量SQL后,本服务会对SQL的文本内容进行存储,以便进行分析。用户可自行设置全量SQL的保存时间范围,到期后会自动删除;如果未设置,数据默认保留7天。 打开或者关闭DAS收集慢SQL开关。开启慢SQL后,本服务会对慢SQL的文本内容进行存储,以便进行分析。用户可自行设置慢SQL的保存时间范围,到期后会自动删除;如果未设置,数据默认保留7天。该功能仅支持付费实例。

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) ChangeSqlSwitchInvoker added in v0.0.90

func (c *DasClient) ChangeSqlSwitchInvoker(request *model.ChangeSqlSwitchRequest) *ChangeSqlSwitchInvoker

ChangeSqlSwitchInvoker 开启/关闭全量SQL、慢SQL开关

func (*DasClient) CreateSpaceAnalysisTask

CreateSpaceAnalysisTask 创建空间分析任务

创建空间分析任务,如触发重新分析,支持MySQL和GaussDB(for MySQL)引擎

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) CreateSpaceAnalysisTaskInvoker added in v0.0.90

func (c *DasClient) CreateSpaceAnalysisTaskInvoker(request *model.CreateSpaceAnalysisTaskRequest) *CreateSpaceAnalysisTaskInvoker

CreateSpaceAnalysisTaskInvoker 创建空间分析任务

func (*DasClient) DeleteDbUser

func (c *DasClient) DeleteDbUser(request *model.DeleteDbUserRequest) (*model.DeleteDbUserResponse, error)

DeleteDbUser 删除数据库用户

删除注册在DAS里的数据库用户。此接口只是将注册的数据库用户在DAS系统里删除,不会真正删除数据库用户对象。 目前仅支持MySQL实例。

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) DeleteDbUserInvoker added in v0.0.90

func (c *DasClient) DeleteDbUserInvoker(request *model.DeleteDbUserRequest) *DeleteDbUserInvoker

DeleteDbUserInvoker 删除数据库用户

func (*DasClient) DeleteProcess

func (c *DasClient) DeleteProcess(request *model.DeleteProcessRequest) (*model.DeleteProcessResponse, error)

DeleteProcess 查杀会话

查杀会话。支持按照用户、数据库、会话列表查杀会话,三个条件至少指定一个。 目前仅支持MySQL实例。

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) DeleteProcessInvoker added in v0.0.90

func (c *DasClient) DeleteProcessInvoker(request *model.DeleteProcessRequest) *DeleteProcessInvoker

DeleteProcessInvoker 查杀会话

func (*DasClient) ExportSlowQueryLogs

ExportSlowQueryLogs 导出慢SQL数据

DAS收集慢SQL开关打开后,一次性导出指定时间范围内的慢SQL数据,支持分页滚动获取。该功能仅支持付费实例。

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) ExportSlowQueryLogsInvoker added in v0.0.90

func (c *DasClient) ExportSlowQueryLogsInvoker(request *model.ExportSlowQueryLogsRequest) *ExportSlowQueryLogsInvoker

ExportSlowQueryLogsInvoker 导出慢SQL数据

func (*DasClient) ExportSqlStatements

ExportSqlStatements 导出全量SQL

全量SQL开关打开后,一次性导出指定时间范围内的全量SQL数据,支持分页滚动获取。该功能仅支持付费实例。

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) ExportSqlStatementsInvoker added in v0.0.90

func (c *DasClient) ExportSqlStatementsInvoker(request *model.ExportSqlStatementsRequest) *ExportSqlStatementsInvoker

ExportSqlStatementsInvoker 导出全量SQL

func (*DasClient) ListApiVersions

func (c *DasClient) ListApiVersions(request *model.ListApiVersionsRequest) (*model.ListApiVersionsResponse, error)

ListApiVersions 查询API版本列表

查询API版本列表

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) ListApiVersionsInvoker added in v0.0.90

func (c *DasClient) ListApiVersionsInvoker(request *model.ListApiVersionsRequest) *ListApiVersionsInvoker

ListApiVersionsInvoker 查询API版本列表

func (*DasClient) ListDbUsers

func (c *DasClient) ListDbUsers(request *model.ListDbUsersRequest) (*model.ListDbUsersResponse, error)

ListDbUsers 查询数据库用户列表

查询注册在DAS里的数据库用户列表,后续调用其他接口时(如查询实例会话列表接口)需要用到此接口返回的db_user_id。此接口不会返回数据库实例上的数据库用户对象。 目前仅支持MySQL实例。

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) ListDbUsersInvoker added in v0.0.90

func (c *DasClient) ListDbUsersInvoker(request *model.ListDbUsersRequest) *ListDbUsersInvoker

ListDbUsersInvoker 查询数据库用户列表

func (*DasClient) ListInnodbLocks

func (c *DasClient) ListInnodbLocks(request *model.ListInnodbLocksRequest) (*model.ListInnodbLocksResponse, error)

ListInnodbLocks 查询InnoDB锁等待列表

查询InnoDB锁等待列表。 目前仅支持MySQL实例。

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) ListInnodbLocksInvoker added in v0.0.90

func (c *DasClient) ListInnodbLocksInvoker(request *model.ListInnodbLocksRequest) *ListInnodbLocksInvoker

ListInnodbLocksInvoker 查询InnoDB锁等待列表

func (*DasClient) ListMetadataLocks

func (c *DasClient) ListMetadataLocks(request *model.ListMetadataLocksRequest) (*model.ListMetadataLocksResponse, error)

ListMetadataLocks 查询元数据锁列表

查询元数据锁列表。 目前仅支持MySQL实例。

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) ListMetadataLocksInvoker added in v0.0.90

func (c *DasClient) ListMetadataLocksInvoker(request *model.ListMetadataLocksRequest) *ListMetadataLocksInvoker

ListMetadataLocksInvoker 查询元数据锁列表

func (*DasClient) ListProcesses

func (c *DasClient) ListProcesses(request *model.ListProcessesRequest) (*model.ListProcessesResponse, error)

ListProcesses 查询实例会话列表

支持根据数据库、用户查询实例会话列表。 目前仅支持MySQL实例。

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) ListProcessesInvoker added in v0.0.90

func (c *DasClient) ListProcessesInvoker(request *model.ListProcessesRequest) *ListProcessesInvoker

ListProcessesInvoker 查询实例会话列表

func (*DasClient) ListSpaceAnalysis

func (c *DasClient) ListSpaceAnalysis(request *model.ListSpaceAnalysisRequest) (*model.ListSpaceAnalysisResponse, error)

ListSpaceAnalysis 获取空间分析数据列表

获取空间分析数据列表。实例级别数据来源于文件系统,库级别和表级别数据来源于information_schema.tables表。空间&元数据分析最多分析10000张表,若缺少库表空间数据,可能是因为数据库实例表个数过多或者账号未保存密码。如果为保存密码,请使用用户管理接口或页面录入数据库账号。支持MySQL和GaussDB(for MySQL)引擎

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) ListSpaceAnalysisInvoker added in v0.0.90

func (c *DasClient) ListSpaceAnalysisInvoker(request *model.ListSpaceAnalysisRequest) *ListSpaceAnalysisInvoker

ListSpaceAnalysisInvoker 获取空间分析数据列表

func (*DasClient) RegisterDbUser

func (c *DasClient) RegisterDbUser(request *model.RegisterDbUserRequest) (*model.RegisterDbUserResponse, error)

RegisterDbUser 注册数据库用户

此接口是将数据库用户和密码注册进DAS系统,同时会返回一个数据库用户ID ,后续调用其他接口时(如查询实例会话列表接口)需要用到此数据库用户ID。密码为加密存储,且仅用于DAS API相关功能。此接口不会在数据库实例上创建数据库用户对象。请确保输入的用户名和密码是已经存在并且是正确的。 目前仅支持MySQL实例。

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) RegisterDbUserInvoker added in v0.0.90

func (c *DasClient) RegisterDbUserInvoker(request *model.RegisterDbUserRequest) *RegisterDbUserInvoker

RegisterDbUserInvoker 注册数据库用户

func (*DasClient) ShowApiVersion

func (c *DasClient) ShowApiVersion(request *model.ShowApiVersionRequest) (*model.ShowApiVersionResponse, error)

ShowApiVersion 查询指定的API版本信息

查询指定的API版本信息

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) ShowApiVersionInvoker added in v0.0.90

func (c *DasClient) ShowApiVersionInvoker(request *model.ShowApiVersionRequest) *ShowApiVersionInvoker

ShowApiVersionInvoker 查询指定的API版本信息

func (*DasClient) ShowDbUser

func (c *DasClient) ShowDbUser(request *model.ShowDbUserRequest) (*model.ShowDbUserResponse, error)

ShowDbUser 查询数据库用户信息

查询注册在DAS里的数据库用户信息。此接口不能查询数据库实例上的数据库用户对象。 目前仅支持MySQL实例。

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) ShowDbUserInvoker added in v0.0.90

func (c *DasClient) ShowDbUserInvoker(request *model.ShowDbUserRequest) *ShowDbUserInvoker

ShowDbUserInvoker 查询数据库用户信息

func (*DasClient) ShowQuotas

func (c *DasClient) ShowQuotas(request *model.ShowQuotasRequest) (*model.ShowQuotasResponse, error)

ShowQuotas 查询云DBA配额

查询云DBA配额

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) ShowQuotasInvoker added in v0.0.90

func (c *DasClient) ShowQuotasInvoker(request *model.ShowQuotasRequest) *ShowQuotasInvoker

ShowQuotasInvoker 查询云DBA配额

func (*DasClient) ShowSqlExecutionPlan

ShowSqlExecutionPlan 查询SQL执行计划

查询SQL执行计划。 目前仅支持MySQL实例。

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) ShowSqlExecutionPlanInvoker added in v0.0.90

func (c *DasClient) ShowSqlExecutionPlanInvoker(request *model.ShowSqlExecutionPlanRequest) *ShowSqlExecutionPlanInvoker

ShowSqlExecutionPlanInvoker 查询SQL执行计划

func (*DasClient) ShowSqlExplain added in v0.0.81

func (c *DasClient) ShowSqlExplain(request *model.ShowSqlExplainRequest) (*model.ShowSqlExplainResponse, error)

ShowSqlExplain 查询SQL执行计划

查询SQL执行计划。 目前仅支持MySQL实例。 补充GET请求,处理超长SQL

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) ShowSqlExplainInvoker added in v0.0.90

func (c *DasClient) ShowSqlExplainInvoker(request *model.ShowSqlExplainRequest) *ShowSqlExplainInvoker

ShowSqlExplainInvoker 查询SQL执行计划

func (*DasClient) ShowSqlSwitchStatus

ShowSqlSwitchStatus 查询全量SQL和慢SQL的开关状态。

查询DAS收集全量SQL和慢SQL的开关状态。该功能仅支持付费实例。

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) ShowSqlSwitchStatusInvoker added in v0.0.90

func (c *DasClient) ShowSqlSwitchStatusInvoker(request *model.ShowSqlSwitchStatusRequest) *ShowSqlSwitchStatusInvoker

ShowSqlSwitchStatusInvoker 查询全量SQL和慢SQL的开关状态。

func (*DasClient) UpdateDbUser

func (c *DasClient) UpdateDbUser(request *model.UpdateDbUserRequest) (*model.UpdateDbUserResponse, error)

UpdateDbUser 修改数据库用户

修改注册在DAS里的数据库用户名和密码。此接口不会修改数据库实例上的数据库用户对象的用户名和密码。请确保输入的用户名和密码是已经存在并且是正确的。 目前仅支持MySQL实例。

详细说明请参考华为云API Explorer。 Please refer to Huawei cloud API Explorer for details.

func (*DasClient) UpdateDbUserInvoker added in v0.0.90

func (c *DasClient) UpdateDbUserInvoker(request *model.UpdateDbUserRequest) *UpdateDbUserInvoker

UpdateDbUserInvoker 修改数据库用户

type DeleteDbUserInvoker added in v0.0.90

type DeleteDbUserInvoker struct {
	*invoker.BaseInvoker
}

func (*DeleteDbUserInvoker) Invoke added in v0.0.90

type DeleteProcessInvoker added in v0.0.90

type DeleteProcessInvoker struct {
	*invoker.BaseInvoker
}

func (*DeleteProcessInvoker) Invoke added in v0.0.90

type ExportSlowQueryLogsInvoker added in v0.0.90

type ExportSlowQueryLogsInvoker struct {
	*invoker.BaseInvoker
}

func (*ExportSlowQueryLogsInvoker) Invoke added in v0.0.90

type ExportSqlStatementsInvoker added in v0.0.90

type ExportSqlStatementsInvoker struct {
	*invoker.BaseInvoker
}

func (*ExportSqlStatementsInvoker) Invoke added in v0.0.90

type ListApiVersionsInvoker added in v0.0.90

type ListApiVersionsInvoker struct {
	*invoker.BaseInvoker
}

func (*ListApiVersionsInvoker) Invoke added in v0.0.90

type ListDbUsersInvoker added in v0.0.90

type ListDbUsersInvoker struct {
	*invoker.BaseInvoker
}

func (*ListDbUsersInvoker) Invoke added in v0.0.90

type ListInnodbLocksInvoker added in v0.0.90

type ListInnodbLocksInvoker struct {
	*invoker.BaseInvoker
}

func (*ListInnodbLocksInvoker) Invoke added in v0.0.90

type ListMetadataLocksInvoker added in v0.0.90

type ListMetadataLocksInvoker struct {
	*invoker.BaseInvoker
}

func (*ListMetadataLocksInvoker) Invoke added in v0.0.90

type ListProcessesInvoker added in v0.0.90

type ListProcessesInvoker struct {
	*invoker.BaseInvoker
}

func (*ListProcessesInvoker) Invoke added in v0.0.90

type ListSpaceAnalysisInvoker added in v0.0.90

type ListSpaceAnalysisInvoker struct {
	*invoker.BaseInvoker
}

func (*ListSpaceAnalysisInvoker) Invoke added in v0.0.90

type RegisterDbUserInvoker added in v0.0.90

type RegisterDbUserInvoker struct {
	*invoker.BaseInvoker
}

func (*RegisterDbUserInvoker) Invoke added in v0.0.90

type ShowApiVersionInvoker added in v0.0.90

type ShowApiVersionInvoker struct {
	*invoker.BaseInvoker
}

func (*ShowApiVersionInvoker) Invoke added in v0.0.90

type ShowDbUserInvoker added in v0.0.90

type ShowDbUserInvoker struct {
	*invoker.BaseInvoker
}

func (*ShowDbUserInvoker) Invoke added in v0.0.90

type ShowQuotasInvoker added in v0.0.90

type ShowQuotasInvoker struct {
	*invoker.BaseInvoker
}

func (*ShowQuotasInvoker) Invoke added in v0.0.90

type ShowSqlExecutionPlanInvoker added in v0.0.90

type ShowSqlExecutionPlanInvoker struct {
	*invoker.BaseInvoker
}

func (*ShowSqlExecutionPlanInvoker) Invoke added in v0.0.90

type ShowSqlExplainInvoker added in v0.0.90

type ShowSqlExplainInvoker struct {
	*invoker.BaseInvoker
}

func (*ShowSqlExplainInvoker) Invoke added in v0.0.90

type ShowSqlSwitchStatusInvoker added in v0.0.90

type ShowSqlSwitchStatusInvoker struct {
	*invoker.BaseInvoker
}

func (*ShowSqlSwitchStatusInvoker) Invoke added in v0.0.90

type UpdateDbUserInvoker added in v0.0.90

type UpdateDbUserInvoker struct {
	*invoker.BaseInvoker
}

func (*UpdateDbUserInvoker) Invoke added in v0.0.90

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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