Documentation
¶
Index ¶
- Variables
- func ClearOceanbasePwd()
- func GetObproxySysPwd() string
- func GetOceanbasePwd() string
- func IsObproxyAgent() bool
- func SetObproxySysPwd(pwd string)
- func SetOceanbasePwd(pwd string)
- type Agent
- type AgentIdentity
- type AgentInfo
- type AgentInfoInterface
- type AgentInfoWithIdentity
- type AgentInfoWithZone
- type AgentInfoWithZoneInterface
- type AgentInstance
- type AgentPwd
- type AgentSecret
- type AgentStatus
- type IdentityDTO
- func (agent *IdentityDTO) GetIdentity() AgentIdentity
- func (agent *IdentityDTO) IsClusterAgent() bool
- func (agent *IdentityDTO) IsFollowerAgent() bool
- func (agent *IdentityDTO) IsMasterAgent() bool
- func (agent *IdentityDTO) IsScalingInAgent() bool
- func (agent *IdentityDTO) IsScalingOutAgent() bool
- func (agent *IdentityDTO) IsSingleAgent() bool
- func (agent *IdentityDTO) IsTakeOverFollowerAgent() bool
- func (agent *IdentityDTO) IsTakeOverMasterAgent() bool
- func (agent *IdentityDTO) IsTakeover() bool
- func (agent *IdentityDTO) IsUnidentified() bool
- type ObproxyInfo
- type ObserverSvrInfo
- type PublicKeyDTO
- type ZoneDTO
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OBPROXY_HOME_PATH = "" OBPROXY_SQL_PORT = 0 )
View Source
var ( MYSQL_PORT = 0 RPC_PORT = 0 )
View Source
var ( OCEANBASE_PWD string OBPROXY_SYS_PWD string AGENT_PWD AgentPwd OCEANBASE_PASSWORD_INITIALIZED bool // Which means the oceanbase password has been initialized )
Functions ¶
func ClearOceanbasePwd ¶
func ClearOceanbasePwd()
func GetObproxySysPwd ¶
func GetObproxySysPwd() string
func GetOceanbasePwd ¶
func GetOceanbasePwd() string
func IsObproxyAgent ¶
func IsObproxyAgent() bool
func SetObproxySysPwd ¶
func SetObproxySysPwd(pwd string)
func SetOceanbasePwd ¶
func SetOceanbasePwd(pwd string)
Types ¶
type Agent ¶
type Agent interface {
AgentInfoWithZoneInterface
GetIdentity() AgentIdentity
IsMasterAgent() bool
IsSingleAgent() bool
IsFollowerAgent() bool
IsClusterAgent() bool
IsTakeover() bool
IsTakeOverFollowerAgent() bool
IsTakeOverMasterAgent() bool
IsScalingOutAgent() bool
IsScalingInAgent() bool
IsUnidentified() bool
GetVersion() string
GetAgentInfo() AgentInfo
String() string
IsIPv6() bool
GetLocalIp() string
Equal(other AgentInfoInterface) bool
}
var OCS_AGENT Agent
type AgentIdentity ¶
type AgentIdentity string
const ( MASTER AgentIdentity = "MASTER" FOLLOWER AgentIdentity = "FOLLOWER" SINGLE AgentIdentity = "SINGLE" CLUSTER_AGENT AgentIdentity = "CLUSTER AGENT" TAKE_OVER_MASTER AgentIdentity = "TAKE OVER MASTER" TAKE_OVER_FOLLOWER AgentIdentity = "TAKE OVER FOLLOWER" SCALING_OUT AgentIdentity = "SCALING OUT" SCALING_IN AgentIdentity = "SCALING IN" UNIDENTIFIED AgentIdentity = "UNIDENTIFIED" AUTH_V1 = "v1" AUTH_V2 = "v2" )
type AgentInfo ¶
type AgentInfo struct {
Ip string `json:"ip" form:"ip" binding:"required"`
Port int `json:"port" form:"port" binding:"required"`
}
func NewAgentInfo ¶
func NewAgentInfoByInterface ¶
func NewAgentInfoByInterface(agentInfo AgentInfoInterface) *AgentInfo
func NewAgentInfoByString ¶
func (*AgentInfo) Equal ¶
func (a *AgentInfo) Equal(agent AgentInfoInterface) bool
func (*AgentInfo) GetLocalIp ¶
type AgentInfoInterface ¶
type AgentInfoWithIdentity ¶
type AgentInfoWithIdentity struct {
AgentInfo
IdentityDTO
}
func NewAgentInfoWithIdentity ¶
func NewAgentInfoWithIdentity(ip string, port int, identity AgentIdentity) *AgentInfoWithIdentity
type AgentInfoWithZone ¶
func NewAgentWithZone ¶
func NewAgentWithZone(ip string, port int, zone string) *AgentInfoWithZone
func NewAgentWithZoneByAgentInfo ¶
func NewAgentWithZoneByAgentInfo(agentInfo AgentInfoInterface, zone string) *AgentInfoWithZone
type AgentInfoWithZoneInterface ¶
type AgentInfoWithZoneInterface interface {
AgentInfoInterface
GetZone() string
}
type AgentInstance ¶
type AgentInstance struct {
AgentInfo
ZoneDTO
IdentityDTO
Version string `json:"version"`
}
func NewAgentInstance ¶
func NewAgentInstance(ip string, port int, zone string, identity AgentIdentity, version string) *AgentInstance
func NewAgentInstanceByAgent ¶
func NewAgentInstanceByAgent(agent Agent) *AgentInstance
func NewAgentInstanceByAgentInfo ¶
func NewAgentInstanceByAgentInfo(agentInfo AgentInfoInterface, zone string, identity AgentIdentity, version string) *AgentInstance
func (*AgentInstance) GetAgentInfo ¶
func (agent *AgentInstance) GetAgentInfo() AgentInfo
func (*AgentInstance) GetVersion ¶
func (agent *AgentInstance) GetVersion() string
type AgentPwd ¶
type AgentPwd struct {
// contains filtered or unexported fields
}
func (*AgentPwd) GetPassword ¶
func (*AgentPwd) SetPassword ¶
type AgentSecret ¶
type AgentSecret struct {
AgentInfo
PublicKeyDTO
}
func NewAgentSecret ¶
func NewAgentSecret(ip string, port int, publicKey string) *AgentSecret
func NewAgentSecretByAgentInfo ¶
func NewAgentSecretByAgentInfo(agent AgentInfoInterface, publicKey string) *AgentSecret
type AgentStatus ¶
type AgentStatus struct {
Pid int `json:"pid"`
State int32 `json:"state"`
StartAt int64 `json:"startAt"`
HomePath string `json:"homePath"`
OBVersion string `json:"obVersion"`
Architecture string `json:"architecture"`
AgentInstance
IsObproxyAgent bool `json:"isObproxyAgent"`
Security bool `json:"security"`
SupportedAuth []string `json:"supportedAuth"`
}
type IdentityDTO ¶
type IdentityDTO struct {
Identity AgentIdentity `json:"identity" binding:"required"`
}
func (*IdentityDTO) GetIdentity ¶
func (agent *IdentityDTO) GetIdentity() AgentIdentity
func (*IdentityDTO) IsClusterAgent ¶
func (agent *IdentityDTO) IsClusterAgent() bool
func (*IdentityDTO) IsFollowerAgent ¶
func (agent *IdentityDTO) IsFollowerAgent() bool
func (*IdentityDTO) IsMasterAgent ¶
func (agent *IdentityDTO) IsMasterAgent() bool
func (*IdentityDTO) IsScalingInAgent ¶
func (agent *IdentityDTO) IsScalingInAgent() bool
func (*IdentityDTO) IsScalingOutAgent ¶
func (agent *IdentityDTO) IsScalingOutAgent() bool
func (*IdentityDTO) IsSingleAgent ¶
func (agent *IdentityDTO) IsSingleAgent() bool
func (*IdentityDTO) IsTakeOverFollowerAgent ¶
func (agent *IdentityDTO) IsTakeOverFollowerAgent() bool
func (*IdentityDTO) IsTakeOverMasterAgent ¶
func (agent *IdentityDTO) IsTakeOverMasterAgent() bool
func (*IdentityDTO) IsTakeover ¶
func (agent *IdentityDTO) IsTakeover() bool
func (*IdentityDTO) IsUnidentified ¶
func (agent *IdentityDTO) IsUnidentified() bool
type ObproxyInfo ¶
type ObproxyInfo = AgentInfo
type ObserverSvrInfo ¶
type ObserverSvrInfo = AgentInfo
type PublicKeyDTO ¶
type PublicKeyDTO struct {
PublicKey string `json:"public_key" form:"public_key" binding:"required"`
}
Click to show internal directories.
Click to hide internal directories.