meta

package
v0.0.0-...-cbf23a9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

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 NewAgentInfo(ip string, port int) *AgentInfo

func NewAgentInfoByInterface

func NewAgentInfoByInterface(agentInfo AgentInfoInterface) *AgentInfo

func NewAgentInfoByString

func NewAgentInfoByString(info string) *AgentInfo

func (*AgentInfo) Equal

func (a *AgentInfo) Equal(agent AgentInfoInterface) bool

func (*AgentInfo) GetIp

func (agentInfo *AgentInfo) GetIp() string

func (*AgentInfo) GetPort

func (agentInfo *AgentInfo) GetPort() int

func (*AgentInfo) String

func (agentInfo *AgentInfo) String() string

type AgentInfoInterface

type AgentInfoInterface interface {
	GetIp() string
	GetPort() int
	String() string
}

type AgentInfoWithIdentity

type AgentInfoWithIdentity struct {
	AgentInfo
	IdentityDTO
}

func NewAgentInfoWithIdentity

func NewAgentInfoWithIdentity(ip string, port int, identity AgentIdentity) *AgentInfoWithIdentity

type AgentInfoWithZone

type AgentInfoWithZone struct {
	AgentInfo
	ZoneDTO
}

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

func NewAgentStatus(agent Agent, pid int, state int32, startAt int64, homePath string, obVersion string) *AgentStatus

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"`
}

type ZoneDTO

type ZoneDTO struct {
	Zone string `json:"zone" binding:"required"`
}

func (*ZoneDTO) GetZone

func (agent *ZoneDTO) GetZone() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL