Documentation
¶
Overview ¶
Package udbproxy include resources of ucloud udbproxy product
See also
- API: https://docs.ucloud.cn/api/udbproxy-api/index
- Product: https://www.ucloud.cn/site/product/udbproxy.html
for detail.
Index ¶
- type BaseDBData
- type DescribeUDBProxyRequest
- type DescribeUDBProxyResponse
- type ListUDBProxyClientRequest
- type ListUDBProxyClientResponse
- type ListUDBProxyInstanceByDBRequest
- type ListUDBProxyInstanceByDBResponse
- type Node
- type NodeClientInfo
- type PrivateDomainInfo
- type ProxyProcesslist
- type Replica
- type UDBProxyBaseItem
- type UDBProxyClient
- func (c *UDBProxyClient) DescribeUDBProxy(req *DescribeUDBProxyRequest) (*DescribeUDBProxyResponse, error)
- func (c *UDBProxyClient) ListUDBProxyClient(req *ListUDBProxyClientRequest) (*ListUDBProxyClientResponse, error)
- func (c *UDBProxyClient) ListUDBProxyInstanceByDB(req *ListUDBProxyInstanceByDBRequest) (*ListUDBProxyInstanceByDBResponse, error)
- func (c *UDBProxyClient) NewDescribeUDBProxyRequest() *DescribeUDBProxyRequest
- func (c *UDBProxyClient) NewListUDBProxyClientRequest() *ListUDBProxyClientRequest
- func (c *UDBProxyClient) NewListUDBProxyInstanceByDBRequest() *ListUDBProxyInstanceByDBRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseDBData ¶ added in v0.22.151
BaseDBData - 加入代理DB基础信息
type DescribeUDBProxyRequest ¶ added in v0.22.151
type DescribeUDBProxyRequest struct {
request.CommonBase
// 读写分离ID
UDBProxyID *string `required:"true"`
}
DescribeUDBProxyRequest is request schema for DescribeUDBProxy action
type DescribeUDBProxyResponse ¶ added in v0.22.151
type DescribeUDBProxyResponse struct {
response.CommonBase
// cpu核数
CPUCores int
// 创建时间
CreateTime int
// 延迟阈值(单位s)
DelayThreshold int
// 是否启用事务拆分(1:启用事务拆分,2:关闭事务拆分)
EnableTransSplit int
// 实例版本
InstanceVersion string
// UDB代理服务最大连接数
MaxConnection int
// 内存
Memory int
// 修改时间
ModifyTime int
// 名称
Name string
// 集群实例节点数
NodeCount int
// 集群实例服务节点数据
Nodes []Node
// 代理实例的内网域名及其开关状态,含域名地址、域名开关、域名数据源指向
PrivateDomainInfo PrivateDomainInfo
// 读权重模式:1-主节点模式;2-节点均衡模式;3-从节点均衡(排除主节点);5-用户自定义模式
ReadWeightMode int
// sql限流数量
SQLLimitCount int
// sql路由数量
SQLRouterCount int
// 状态
State string
// UDBProxy实例ID
UDBProxyID string
// UDB代理服务IP
UDBProxyIP string
// UDB代理服务端口
UDBProxyPort int
// UDB集群数据
UDBReplicas []Replica
// 可用区id
ZoneId int
}
DescribeUDBProxyResponse is response schema for DescribeUDBProxy action
type ListUDBProxyClientRequest ¶
type ListUDBProxyClientRequest struct {
request.CommonBase
// 代理ID
UDBProxyID *string `required:"true"`
}
ListUDBProxyClientRequest is request schema for ListUDBProxyClient action
type ListUDBProxyClientResponse ¶
type ListUDBProxyClientResponse struct {
response.CommonBase
// 代理节点客户端IP连接信息
NodeClientInfos []NodeClientInfo
// 代理ID
UDBProxyID string
}
ListUDBProxyClientResponse is response schema for ListUDBProxyClient action
type ListUDBProxyInstanceByDBRequest ¶ added in v0.22.151
type ListUDBProxyInstanceByDBRequest struct {
request.CommonBase
// 数据库DB资源ID
DBID *string `required:"true"`
}
ListUDBProxyInstanceByDBRequest is request schema for ListUDBProxyInstanceByDB action
type ListUDBProxyInstanceByDBResponse ¶ added in v0.22.151
type ListUDBProxyInstanceByDBResponse struct {
response.CommonBase
// 错误码
Message string
// 代理列表数据
UDBProxyBaseItems []UDBProxyBaseItem
}
ListUDBProxyInstanceByDBResponse is response schema for ListUDBProxyInstanceByDB action
type NodeClientInfo ¶
type NodeClientInfo struct {
// 代理节点ID
ID string
// 代理节点IP
IP string
// 客户端IP连接信息
Records []ProxyProcesslist
}
NodeClientInfo - 代理节点来源IP信息
type PrivateDomainInfo ¶ added in v0.22.151
type PrivateDomainInfo struct {
// 内网域名指向的数据源:1 指向主库(可直连数据库),2 指向代理(经 UDBProxy访问);未开通时返回 2
EnableConnectToDB int
// 内网域名是否已开启:1 已开启,2 已关闭;未开通内网域名时返回 2
EnablePrivateDomain int
// 实例的内网域名地址,形如 xxx.ucloudcs.com;未开通内网域名时为空字符串
PrivateDomain string
}
PrivateDomainInfo - 代理实例的内网域名及其开关状态,含域名地址、域名开关、域名数据源指向
type ProxyProcesslist ¶ added in v0.21.50
type ProxyProcesslist struct {
// 客户端来源IP地址
ClientHost string
// 显示当前连接的执行的命令
Command string
// 当前执行的命令是在哪一个数据库上。如果没有指定数据库,则该值为 NULL
DB string
// 数据库资源ID
DBID string
// 代理连接DB地址
Host string
// 当前连接DB进程ID
ID int
// 一般记录的是线程执行的语句
Info string
// 数据库角色(主库/从库)
Role string
// 线程的状态,和 Command 对应
State string
// 表示该线程处于当前状态的时间
Time int
// 启动这个线程的用户
User string
}
ProxyProcesslist - 连接代理信息
type Replica ¶ added in v0.22.151
type Replica struct {
// 创建时间
CreateTime int
// 数据库ID
ID string
// 数据库IP
IP string
// 是否加入代理服务(true:加入,false:未加入)
JoinState bool
// 修改时间
ModifyTime int
// 数据库名称
Name string
// 数据库服务端口
Port int
// 读权重
ReadWeight int
// 角色[master-主库,slave-从库]
Role string
// 状态
State string
}
Replica - UDB数据
type UDBProxyBaseItem ¶ added in v0.22.151
type UDBProxyBaseItem struct {
// 加入代理DB信息
BaseDBDataArr []BaseDBData
// 单个代理节点CPU核数
CPUCores int
// 创建时间
CreateTime int
// 代理ID
ID string
// 代理IP
IP string
// 实例版本
InstanceVersion string
// 单个代理内存
Memory int
// 代理名称
Name string
// 代理节点数
NodeCount int
// 代理端口
Port int
// 读权重模式:1-主节点模式;2-节点均衡模式;3-从节点均衡(排除主节点);5-用户自定义模式
ReadWeightMode int
// 状态
State string
// 可用区ID
ZoneID int
}
UDBProxyBaseItem - 代理列表基础信息
type UDBProxyClient ¶
UDBProxyClient is the client of UDBProxy
func NewClient ¶
func NewClient(config *ucloud.Config, credential *auth.Credential) *UDBProxyClient
NewClient will return a instance of UDBProxyClient
func (*UDBProxyClient) DescribeUDBProxy ¶ added in v0.22.151
func (c *UDBProxyClient) DescribeUDBProxy(req *DescribeUDBProxyRequest) (*DescribeUDBProxyResponse, error)
API: DescribeUDBProxy
获取UDB代理服务详细信息
func (*UDBProxyClient) ListUDBProxyClient ¶
func (c *UDBProxyClient) ListUDBProxyClient(req *ListUDBProxyClientRequest) (*ListUDBProxyClientResponse, error)
API: ListUDBProxyClient
查询代理客户端连接IP信息(实时)
func (*UDBProxyClient) ListUDBProxyInstanceByDB ¶ added in v0.22.151
func (c *UDBProxyClient) ListUDBProxyInstanceByDB(req *ListUDBProxyInstanceByDBRequest) (*ListUDBProxyInstanceByDBResponse, error)
API: ListUDBProxyInstanceByDB
查询DB启用代理数据
func (*UDBProxyClient) NewDescribeUDBProxyRequest ¶ added in v0.22.151
func (c *UDBProxyClient) NewDescribeUDBProxyRequest() *DescribeUDBProxyRequest
NewDescribeUDBProxyRequest will create request of DescribeUDBProxy action.
func (*UDBProxyClient) NewListUDBProxyClientRequest ¶
func (c *UDBProxyClient) NewListUDBProxyClientRequest() *ListUDBProxyClientRequest
NewListUDBProxyClientRequest will create request of ListUDBProxyClient action.
func (*UDBProxyClient) NewListUDBProxyInstanceByDBRequest ¶ added in v0.22.151
func (c *UDBProxyClient) NewListUDBProxyInstanceByDBRequest() *ListUDBProxyInstanceByDBRequest
NewListUDBProxyInstanceByDBRequest will create request of ListUDBProxyInstanceByDB action.