agent

package
v0.0.0-...-fa7df82 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	meta.AgentInstance
	MasterAgent *meta.AgentInfoWithZone
}

type AgentService

type AgentService struct{}

func (*AgentService) AddAgent

func (s *AgentService) AddAgent(agentInstance meta.Agent, homePath string, os string, arch string, publicKey string, token string) error

AddAgent will add agent to all_agent

func (*AgentService) AddAgentInOB

func (s *AgentService) AddAgentInOB(agent oceanbase.AllAgent) error

func (*AgentService) BeFollowerAgent

func (s *AgentService) BeFollowerAgent(masterAgent meta.AgentInstance, zone string) error

func (*AgentService) BeMasterAgent

func (s *AgentService) BeMasterAgent(zone string) error

func (*AgentService) BeScalingOutAgent

func (s *AgentService) BeScalingOutAgent(zone string) error

func (*AgentService) BeSingleAgent

func (s *AgentService) BeSingleAgent() error

func (*AgentService) CheckCanBeTakeOverMaster

func (s *AgentService) CheckCanBeTakeOverMaster() (bool, error)

func (*AgentService) ConvertToClusterAgent

func (s *AgentService) ConvertToClusterAgent(agent meta.Agent) error

func (*AgentService) CreateTakeOverAgent

func (s *AgentService) CreateTakeOverAgent(identity meta.AgentIdentity) (err error)

func (*AgentService) DeleteAgent

func (s *AgentService) DeleteAgent(agent meta.AgentInfoInterface) error

func (*AgentService) DeleteAgentInOB

func (s *AgentService) DeleteAgentInOB(agent meta.AgentInfoInterface) error

func (*AgentService) FindAgentInstance

func (s *AgentService) FindAgentInstance(agentInfo meta.AgentInfoInterface) (agent *meta.AgentInstance, err error)

FindAgentInstance will get agent by ip and port, if not exist, return nil

func (*AgentService) FindAgentInstanceByZone

func (s *AgentService) FindAgentInstanceByZone(zone string) (agents []meta.AgentInstance, err error)

func (*AgentService) GetAgentDO

func (s *AgentService) GetAgentDO(agentInfo meta.AgentInfoInterface) (agent sqlite.AllAgent, err error)

func (*AgentService) GetAgentInfoByZoneFromOB

func (s *AgentService) GetAgentInfoByZoneFromOB(zone string) (agents []meta.AgentInfo, err error)

func (*AgentService) GetAgentInstance

func (s *AgentService) GetAgentInstance(agentInfo meta.AgentInfoInterface) (*meta.AgentInstance, error)

GetAgentInstance will get agent by ip and port, if not exist, return err

func (*AgentService) GetAgentInstanceByIpAndRpcPortFromOB

func (s *AgentService) GetAgentInstanceByIpAndRpcPortFromOB(ip string, rpcPort int) (agent *meta.AgentInstance, err error)

func (*AgentService) GetAgentInstanceByZone

func (s *AgentService) GetAgentInstanceByZone(zone string) (agents []meta.AgentInstance, err error)

func (*AgentService) GetAllAgentInstances

func (s *AgentService) GetAllAgentInstances() (agents []meta.AgentInstance, err error)

func (*AgentService) GetAllAgents

func (s *AgentService) GetAllAgents() ([]meta.AgentInstance, error)

func (*AgentService) GetAllAgentsDO

func (s *AgentService) GetAllAgentsDO() (agents []sqlite.AllAgent, err error)

func (*AgentService) GetAllAgentsDOFromOB

func (s *AgentService) GetAllAgentsDOFromOB() (agents []oceanbase.AllAgent, err error)

func (*AgentService) GetAllAgentsFromOB

func (s *AgentService) GetAllAgentsFromOB() ([]meta.AgentInstance, error)

func (*AgentService) GetAllAgentsInfo

func (s *AgentService) GetAllAgentsInfo() (agents []meta.AgentInfo, err error)

func (*AgentService) GetAllAgentsInfoFromOB

func (s *AgentService) GetAllAgentsInfoFromOB() (agents []meta.AgentInfo, err error)

func (*AgentService) GetFollowerAgents

func (s *AgentService) GetFollowerAgents() ([]meta.AgentInstance, error)

func (*AgentService) GetFollowerAgentsFromOB

func (s *AgentService) GetFollowerAgentsFromOB() ([]meta.AgentInstance, error)

func (*AgentService) GetIP

func (s *AgentService) GetIP() (ip string, err error)

func (*AgentService) GetMasterAgentInfo

func (s *AgentService) GetMasterAgentInfo() *meta.AgentInfo

func (*AgentService) GetRsListExceptMaster

func (agentService *AgentService) GetRsListExceptMaster(zone string) (rsList []string, err error)

func (*AgentService) GetRsOfMaster

func (agentService *AgentService) GetRsOfMaster(identity string) (rs string, err error)

func (*AgentService) GetTakeOverFollowerAgentsFromOB

func (s *AgentService) GetTakeOverFollowerAgentsFromOB() ([]meta.AgentInstance, error)

func (*AgentService) GetTakeOverMasterAgent

func (s *AgentService) GetTakeOverMasterAgent() (agent *meta.AgentInfo, err error)

func (*AgentService) GetTargetServerMysqlList

func (agentService *AgentService) GetTargetServerMysqlList(serverRange string) (res []string, err error)

func (*AgentService) GetTargetServerRpcList

func (agentService *AgentService) GetTargetServerRpcList(serverRange string) (res []string, err error)

func (*AgentService) InitAgent

func (s *AgentService) InitAgent() error

func (*AgentService) InitializeAgentStatus

func (agentService *AgentService) InitializeAgentStatus() (err error)

func (*AgentService) IsAgentExist

func (s *AgentService) IsAgentExist(agentInfo meta.AgentInfoInterface) (bool, error)

func (*AgentService) RecoveryMasterAgentFromOB

func (s *AgentService) RecoveryMasterAgentFromOB() (err error)

func (*AgentService) RemoveInvalidAgent

func (s *AgentService) RemoveInvalidAgent() (err error)

func (*AgentService) SyncAgentData

func (s *AgentService) SyncAgentData() (err error)

func (*AgentService) UpdateAgent

func (s *AgentService) UpdateAgent(agentInstance meta.Agent, homePath string, os string, arch string, publicKey string, token string) error

func (*AgentService) UpdateAgentIP

func (s *AgentService) UpdateAgentIP(ip string) error

func (*AgentService) UpdateAgentInfo

func (s *AgentService) UpdateAgentInfo(agentInfo meta.AgentInfoInterface) error

func (*AgentService) UpdateAgentOBPort

func (s *AgentService) UpdateAgentOBPort(agent meta.AgentInfoInterface, mysqlPort, rpcPort int) error

func (*AgentService) UpdateAgentPublicKey

func (s *AgentService) UpdateAgentPublicKey(publicKey string) (err error)

func (*AgentService) UpdateAgentVersion

func (s *AgentService) UpdateAgentVersion() (err error)

func (*AgentService) UpdatePort

func (s *AgentService) UpdatePort(mysqlPort, rpcPort int) error

func (*AgentService) UpdatePortAndZone

func (s *AgentService) UpdatePortAndZone(mysqlPort int, rpcPort int, zone string) error

Jump to

Keyboard shortcuts

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