Documentation ¶
Index ¶
- Variables
- func GetOceanbasePwd() string
- func SetOceanbasePwd(pwd string)
- type Agent
- type AgentIdentity
- type AgentInfo
- type AgentInfoInterface
- type AgentInfoWithIdentity
- type AgentInfoWithZone
- type AgentInfoWithZoneInterface
- type AgentInstance
- 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) 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 PublicKeyDTO
- type ZoneDTO
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MYSQL_PORT = 0 RPC_PORT = 0 )
View Source
var (
OCEANBASE_PWD string
)
Functions ¶
func GetOceanbasePwd ¶
func GetOceanbasePwd() 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 IsUnidentified() bool GetVersion() string GetAgentInfo() AgentInfo String() 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" UNIDENTIFIED AgentIdentity = "UNIDENTIFIED" )
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
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 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"` AgentInstance }
func NewAgentStatus ¶
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) 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 PublicKeyDTO ¶
type PublicKeyDTO struct {
PublicKey string `json:"public_key" form:"public_key" binding:"required"`
}
Click to show internal directories.
Click to hide internal directories.