Documentation ¶
Index ¶
Constants ¶
View Source
const ( RespTypEve = "event" RespTypMsg = "message" RespTypMeta = "metadata" RespEveSucc = "Success" RespEveFail = "Failed" GetOperation OperationKind = "get" CreateOperation OperationKind = "create" DeleteOperation OperationKind = "delete" ListOperation OperationKind = "list" CheckRunningOperation OperationKind = "checkRunning" CheckStatusOperation OperationKind = "checkStatus" CheckRoleOperation OperationKind = "checkRole" GetRoleOperation OperationKind = "getRole" GetLagOperation OperationKind = "getLag" SwitchoverOperation OperationKind = "switchover" ExecOperation OperationKind = "exec" QueryOperation OperationKind = "query" CloseOperation OperationKind = "close" LockOperation OperationKind = "lockInstance" UnlockOperation OperationKind = "unlockInstance" VolumeProtection OperationKind = "volumeProtection" // actions for cluster accounts management ListUsersOp OperationKind = "listUsers" CreateUserOp OperationKind = "createUser" DeleteUserOp OperationKind = "deleteUser" DescribeUserOp OperationKind = "describeUser" GrantUserRoleOp OperationKind = "grantUserRole" RevokeUserRoleOp OperationKind = "revokeUserRole" ListSystemAccountsOp OperationKind = "listSystemAccounts" JoinMemberOperation OperationKind = "joinMember" LeaveMemberOperation OperationKind = "leaveMember" OperationNotImplemented = "NotImplemented" OperationInvalid = "Invalid" OperationSuccess = "Success" OperationFailed = "Failed" HTTPRequestPrefx string = "curl -X POST -H 'Content-Type: application/json' http://localhost:%d/v1.0/bindings/%s" // this is a general script template, which can be used for all kinds of exec request to databases. DataScriptRequestTpl string = `` /* 305-byte string literal not displayed */ )
View Source
const ( WorkloadTypeKey = "workloadType" Replication = "Replication" Consensus = "Consensus" )
View Source
const (
UnsupportedOps errorReason = "unsupported operation"
)
Variables ¶
This section is empty.
Functions ¶
func IsHAAvailable ¶
func IsUnSupportedError ¶
IsUnSupportedError checks if the error is unsupported operation error
Types ¶
type OperationKind ¶
type OperationKind string
type SQLChannelError ¶
type SQLChannelError struct {
Reason errorReason
}
SQLChannelError is the error for sqlchannel, it implements error interface
func (SQLChannelError) Error ¶
func (e SQLChannelError) Error() string
type SQLChannelMeta ¶
type SQLChannelMeta struct { Operation string `json:"operation,omitempty"` StartTime time.Time `json:"startTime,omitempty"` EndTime time.Time `json:"endTime,omitempty"` Extra string `json:"extra,omitempty"` }
SQLChannelMeta is the metadata for sqlchannel
type SQLChannelRequest ¶
type SQLChannelRequest struct { Operation string `json:"operation"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
SQLChannelRequest is the request for sqlchannel
type SQLChannelResponse ¶
type SQLChannelResponse struct { Event string `json:"event,omitempty"` Message string `json:"message,omitempty"` Metadata SQLChannelMeta `json:"metadata,omitempty"` }
SQLChannelResponse is the response for sqlchannel
type UserInfo ¶
type UserInfo struct { UserName string `json:"userName"` Password string `json:"password,omitempty"` Expired string `json:"expired,omitempty"` ExpireAt time.Duration `json:"expireAt,omitempty"` RoleName string `json:"roleName,omitempty"` }
UserInfo is the user information for account management
Click to show internal directories.
Click to hide internal directories.