Documentation ¶
Index ¶
- Constants
- func CreateEvent(reason string, data map[string]any) (*corev1.Event, error)
- func NewProbeError(msg string) error
- func SendEvent(ctx context.Context, event *corev1.Event) error
- func SentEventForProbe(ctx context.Context, data map[string]any) error
- type OperationKind
- type ProbeError
- type RoleType
Constants ¶
View Source
const ( RespFieldEvent = "event" RespFieldMessage = "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" DefaultProbeTimeoutSeconds = 2 // 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 */ )
Variables ¶
This section is empty.
Functions ¶
func NewProbeError ¶
Types ¶
type OperationKind ¶
type OperationKind string
type ProbeError ¶
type ProbeError struct {
// contains filtered or unexported fields
}
ProbeError is the error for Lorry probe api, it implements error interface
func (ProbeError) Error ¶
func (e ProbeError) Error() string
Click to show internal directories.
Click to hide internal directories.