Documentation ¶
Index ¶
- Constants
- type ObclusterService
- func (obclusterService *ObclusterService) AddServer(ip, port, zoneName string) (err error)
- func (obclusterService *ObclusterService) AddServers(sql []string) (err error)
- func (obclusterService *ObclusterService) AddZone(zone string) (err error)
- func (obclusterService *ObclusterService) AddZoneInRegion(zone string, region string) (err error)
- func (obclusterService *ObclusterService) Bootstrap(sql string) (err error)
- func (ObclusterService *ObclusterService) CancelDeleteServer(svrInfo meta.ObserverSvrInfo) (err error)
- func (obclusterService *ObclusterService) DeleteServer(svrInfo meta.ObserverSvrInfo) (err error)
- func (obclusterService *ObclusterService) DeleteServerInZone(ip, port, zoneName string) (err error)
- func (obclusterService *ObclusterService) DeleteZone(zoneName string) (err error)
- func (obclusterService *ObclusterService) DownloadUpgradePkgChunkInBatch(filepath string, pkgId, chunkCount int) error
- func (obclusterService *ObclusterService) DumpUpgradePkgInfoAndChunkTx(rpmPkg *rpm.Package, file multipart.File, upgradeDepYml string) (pkgInfo *oceanbase.UpgradePkgInfo, err error)
- func (obclusterService *ObclusterService) ExecuteSql(sql string) (err error)
- func (obclusterService *ObclusterService) ExecuteSqlWithoutIdentityCheck(sql string) (err error)
- func (ObclusterService *ObclusterService) GetAllArchs() (archs []string, err error)
- func (obclusterService *ObclusterService) GetAllOBServers() (server []oceanbase.OBServer, err error)
- func (obclusterService *ObclusterService) GetAllZone() (zones []oceanbase.DbaObZones, err error)
- func (ObclusterService *ObclusterService) GetAllZonesWithRegion() (zones []oceanbase.DbaObZones, err error)
- func (obclusterService *ObclusterService) GetCharsetAndCollation(charset string, collation string) (*oceanbase.Collations, error)
- func (obclusterService *ObclusterService) GetClusterStatusLock() (*TxLock, error)
- func (obclusterService *ObclusterService) GetInactiveServerCount() (count int, err error)
- func (ObclusterService *ObclusterService) GetLogInfosInServer(svrInfo meta.ObserverSvrInfo) (logStats []oceanbase.ObLogStat, err error)
- func (obclusterService *ObclusterService) GetNotInSyncServerCount() (count int, err error)
- func (obclusterService *ObclusterService) GetOBServer(svrInfo meta.ObserverSvrInfo) (observer *oceanbase.OBServer, err error)
- func (obclusterService *ObclusterService) GetOBServerByAgentInfo(agent meta.AgentInfo) (server *oceanbase.OBServer, err error)
- func (obclusterService *ObclusterService) GetOBServersByZone(zone string) (observers []oceanbase.OBServer, err error)
- func (obclusterService *ObclusterService) GetObBuildVersion() (build_version string, err error)
- func (obclusterService *ObclusterService) GetObParametersForUpgrade(params []string) (res []oceanbase.ObParameters, err error)
- func (ObclusterService *ObclusterService) GetObUnitsOnServer(svrIp string, svrPort int) (units []oceanbase.DbaObUnit, err error)
- func (obclusterService *ObclusterService) GetObVersion() (version string, err error)
- func (obclusterService *ObclusterService) GetObZonesName() (zones []string, err error)
- func (obclusterService *ObclusterService) GetServerByZone(name string) (servers []oceanbase.OBServer, err error)
- func (ObclusterService *ObclusterService) GetServerCheckpointScn(servers []oceanbase.OBServer) (map[oceanbase.OBServer]uint64, error)
- func (obclusterService *ObclusterService) GetUTCTime() (t time.Time, err error)
- func (obclusterService *ObclusterService) GetUpgradePkgChunkByPkgIdAndChunkId(pkgId, chunkId int) (chunk oceanbase.UpgradePkgChunk, err error)
- func (obclusterService *ObclusterService) GetUpgradePkgChunkCountByPkgId(pkgId int) (count int64, err error)
- func (obclusterService *ObclusterService) GetUpgradePkgInfoByVersion(name, version, arch, distribution string, deprecatedInfo []string) (pkgInfo oceanbase.UpgradePkgInfo, err error)
- func (obclusterService *ObclusterService) GetUpgradePkgInfoByVersionAndRelease(name, version, release, distribution, arch string) (pkgInfo oceanbase.UpgradePkgInfo, err error)
- func (obclusterService *ObclusterService) GetUpgradePkgInfoByVersionAndReleaseDist(name, version, releaseDist, arch string) (pkgInfo oceanbase.UpgradePkgInfo, err error)
- func (obclusterService *ObclusterService) GetZone(zoneName string) (zone *oceanbase.DbaObZones, err error)
- func (obclusterService *ObclusterService) GetZoneCount() (count int, err error)
- func (obclusterService *ObclusterService) HasOtherStopTask(excludeZone string) (bool, error)
- func (ObclusterService *ObclusterService) HasUnitInZone(zone string) (exist bool, err error)
- func (obclusterService *ObclusterService) InitializeClusterStatusForLock() error
- func (obclusterService *ObclusterService) IsLsCheckpointAfterTs(server oceanbase.OBServer) (checkpintScn uint64, err error)
- func (ObclusterService *ObclusterService) IsLsMultiPaxosAlive(lsId int, tenantId int, svrInfo meta.ObserverSvrInfo) (bool, error)
- func (obclusterService *ObclusterService) IsServerExist(ip string, port string) (bool, error)
- func (obclusterService *ObclusterService) IsServerExistWithZone(ip string, port string, zone string) (bool, error)
- func (obclusterService *ObclusterService) IsZoneActive(zone string) (bool, error)
- func (obclusterService *ObclusterService) IsZoneExist(zone string) (res bool, err error)
- func (obclusterService *ObclusterService) IsZoneExistInOB(zone string) (res bool, err error)
- func (obclusterService *ObclusterService) IsZoneInactive(zone string) (bool, error)
- func (obclusterService *ObclusterService) MigrateAllAgentToOb() (err error)
- func (obclusterService *ObclusterService) MigrateObSysParameter() (err error)
- func (obclusterService *ObclusterService) MinorFreeze(servers []oceanbase.OBServer) (err error)
- func (obclusterService *ObclusterService) ModifyUserPwd(user, pwd string) (err error)
- func (obclusterService *ObclusterService) RestoreParamsForUpgrade(params []oceanbase.ObParameters) (err error)
- func (obclusterService *ObclusterService) StartZone(zone string) (err error)
- func (obclusterService *ObclusterService) StopZone(zone string) (err error)
- func (obclusterService *ObclusterService) UpdateAllAgentIdentity(identity string) (err error)
- func (s *ObclusterService) UpdateClusterConfig(config map[string]string, deleteAll bool) (err error)
- type ObserverService
- func (s *ObserverService) ClearGlobalConfig() error
- func (s *ObserverService) ClearObConfig() error
- func (s *ObserverService) ClearObServerConfig() error
- func (s *ObserverService) ClearObZoneConifg() error
- func (s *ObserverService) ClearObserverAndZoneConfig(agent meta.AgentInfoWithZoneInterface) error
- func (s *ObserverService) DeleteObServerConfig(agent meta.AgentInfoInterface) error
- func (s *ObserverService) DeleteObZoneConifg(zone string) error
- func (s *ObserverService) GetOBIntParatemerByName(name string) (value int, err error)
- func (s *ObserverService) GetOBParatemerByName(name string, value interface{}) (err error)
- func (s *ObserverService) GetOBStringParatemerByName(name string) (value string, err error)
- func (s *ObserverService) GetObConfigByName(name string) (config sqlite.ObConfig, err error)
- func (s *ObserverService) GetObConfigMap() (res map[string]string, err error)
- func (s *ObserverService) GetObGlobalConfig() (config []sqlite.ObGlobalConfig, err error)
- func (s *ObserverService) GetObGlobalConfigByName(name string) (config sqlite.ObGlobalConfig, err error)
- func (s *ObserverService) GetObGlobalConfigMap() (map[string]sqlite.ObConfig, error)
- func (s *ObserverService) GetObServerConfig(agentInfo meta.AgentInfoInterface) (config []sqlite.ObServerConfig, err error)
- func (s *ObserverService) GetObServerConfigMap(agentInfo meta.AgentInfoInterface) (map[string]sqlite.ObConfig, error)
- func (s *ObserverService) GetObZoneConfig(zone string) (config []sqlite.ObZoneConfig, err error)
- func (s *ObserverService) GetObZoneConfigMap(zone string) (map[string]sqlite.ObConfig, error)
- func (s *ObserverService) PatchGlobalConfig(globalConfig []*sqlite.ObGlobalConfig) (err error)
- func (s *ObserverService) PatchObConfig(params map[string]string) (err error)
- func (s *ObserverService) PatchObZoneConfig(configs []*sqlite.ObZoneConfig) (err error)
- func (s *ObserverService) PatchObserverConfig(configs []*sqlite.ObServerConfig) (err error)
- func (s *ObserverService) PutObConfig(params map[string]string) (err error)
- func (s *ObserverService) UpdateGlobalConfig(config map[string]string, deleteAll bool) (err error)
- func (s *ObserverService) UpdateServerConfig(config map[string]string, agentList []meta.AgentInfoInterface, deleteAll bool) (err error)
- func (s *ObserverService) UpdateZoneConfig(config map[string]string, zoneList []string, deleteAll bool) (err error)
- type TxLock
Constants ¶
View Source
const ( COLLATIONS = "information_schema.collations" DBA_OB_SERVERS = "oceanbase.DBA_OB_SERVERS" DBA_OB_ZONES = "oceanbase.DBA_OB_ZONES" DBA_OB_UNITS = "oceanbase.DBA_OB_UNITS" GV_OB_LOG_STAT = "oceanbase.GV$OB_LOG_STAT" GV_OB_PARAMETERS = "oceanbase.GV$OB_PARAMETERS" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObclusterService ¶
type ObclusterService struct{}
func (*ObclusterService) AddServer ¶
func (obclusterService *ObclusterService) AddServer(ip, port, zoneName string) (err error)
func (*ObclusterService) AddServers ¶
func (obclusterService *ObclusterService) AddServers(sql []string) (err error)
func (*ObclusterService) AddZone ¶
func (obclusterService *ObclusterService) AddZone(zone string) (err error)
func (*ObclusterService) AddZoneInRegion ¶
func (obclusterService *ObclusterService) AddZoneInRegion(zone string, region string) (err error)
func (*ObclusterService) Bootstrap ¶
func (obclusterService *ObclusterService) Bootstrap(sql string) (err error)
func (*ObclusterService) CancelDeleteServer ¶
func (ObclusterService *ObclusterService) CancelDeleteServer(svrInfo meta.ObserverSvrInfo) (err error)
func (*ObclusterService) DeleteServer ¶
func (obclusterService *ObclusterService) DeleteServer(svrInfo meta.ObserverSvrInfo) (err error)
func (*ObclusterService) DeleteServerInZone ¶
func (obclusterService *ObclusterService) DeleteServerInZone(ip, port, zoneName string) (err error)
func (*ObclusterService) DeleteZone ¶
func (obclusterService *ObclusterService) DeleteZone(zoneName string) (err error)
func (*ObclusterService) DownloadUpgradePkgChunkInBatch ¶
func (obclusterService *ObclusterService) DownloadUpgradePkgChunkInBatch(filepath string, pkgId, chunkCount int) error
func (*ObclusterService) DumpUpgradePkgInfoAndChunkTx ¶
func (obclusterService *ObclusterService) DumpUpgradePkgInfoAndChunkTx(rpmPkg *rpm.Package, file multipart.File, upgradeDepYml string) (pkgInfo *oceanbase.UpgradePkgInfo, err error)
func (*ObclusterService) ExecuteSql ¶
func (obclusterService *ObclusterService) ExecuteSql(sql string) (err error)
func (*ObclusterService) ExecuteSqlWithoutIdentityCheck ¶
func (obclusterService *ObclusterService) ExecuteSqlWithoutIdentityCheck(sql string) (err error)
func (*ObclusterService) GetAllArchs ¶
func (ObclusterService *ObclusterService) GetAllArchs() (archs []string, err error)
func (*ObclusterService) GetAllOBServers ¶
func (obclusterService *ObclusterService) GetAllOBServers() (server []oceanbase.OBServer, err error)
func (*ObclusterService) GetAllZone ¶
func (obclusterService *ObclusterService) GetAllZone() (zones []oceanbase.DbaObZones, err error)
func (*ObclusterService) GetAllZonesWithRegion ¶
func (ObclusterService *ObclusterService) GetAllZonesWithRegion() (zones []oceanbase.DbaObZones, err error)
func (*ObclusterService) GetCharsetAndCollation ¶
func (obclusterService *ObclusterService) GetCharsetAndCollation(charset string, collation string) (*oceanbase.Collations, error)
func (*ObclusterService) GetClusterStatusLock ¶
func (obclusterService *ObclusterService) GetClusterStatusLock() (*TxLock, error)
func (*ObclusterService) GetInactiveServerCount ¶
func (obclusterService *ObclusterService) GetInactiveServerCount() (count int, err error)
func (*ObclusterService) GetLogInfosInServer ¶
func (ObclusterService *ObclusterService) GetLogInfosInServer(svrInfo meta.ObserverSvrInfo) (logStats []oceanbase.ObLogStat, err error)
GetLogInfosInServer returns the log stat in target server only contains tenant_id and ls_id.
func (*ObclusterService) GetNotInSyncServerCount ¶
func (obclusterService *ObclusterService) GetNotInSyncServerCount() (count int, err error)
func (*ObclusterService) GetOBServer ¶
func (obclusterService *ObclusterService) GetOBServer(svrInfo meta.ObserverSvrInfo) (observer *oceanbase.OBServer, err error)
func (*ObclusterService) GetOBServerByAgentInfo ¶
func (*ObclusterService) GetOBServersByZone ¶
func (obclusterService *ObclusterService) GetOBServersByZone(zone string) (observers []oceanbase.OBServer, err error)
func (*ObclusterService) GetObBuildVersion ¶
func (obclusterService *ObclusterService) GetObBuildVersion() (build_version string, err error)
func (*ObclusterService) GetObParametersForUpgrade ¶
func (obclusterService *ObclusterService) GetObParametersForUpgrade(params []string) (res []oceanbase.ObParameters, err error)
func (*ObclusterService) GetObUnitsOnServer ¶
func (*ObclusterService) GetObVersion ¶
func (obclusterService *ObclusterService) GetObVersion() (version string, err error)
func (*ObclusterService) GetObZonesName ¶
func (obclusterService *ObclusterService) GetObZonesName() (zones []string, err error)
func (*ObclusterService) GetServerByZone ¶
func (obclusterService *ObclusterService) GetServerByZone(name string) (servers []oceanbase.OBServer, err error)
func (*ObclusterService) GetServerCheckpointScn ¶
func (*ObclusterService) GetUTCTime ¶
func (obclusterService *ObclusterService) GetUTCTime() (t time.Time, err error)
func (*ObclusterService) GetUpgradePkgChunkByPkgIdAndChunkId ¶
func (obclusterService *ObclusterService) GetUpgradePkgChunkByPkgIdAndChunkId(pkgId, chunkId int) (chunk oceanbase.UpgradePkgChunk, err error)
func (*ObclusterService) GetUpgradePkgChunkCountByPkgId ¶
func (obclusterService *ObclusterService) GetUpgradePkgChunkCountByPkgId(pkgId int) (count int64, err error)
func (*ObclusterService) GetUpgradePkgInfoByVersion ¶
func (obclusterService *ObclusterService) GetUpgradePkgInfoByVersion(name, version, arch, distribution string, deprecatedInfo []string) (pkgInfo oceanbase.UpgradePkgInfo, err error)
func (*ObclusterService) GetUpgradePkgInfoByVersionAndRelease ¶
func (obclusterService *ObclusterService) GetUpgradePkgInfoByVersionAndRelease(name, version, release, distribution, arch string) (pkgInfo oceanbase.UpgradePkgInfo, err error)
func (*ObclusterService) GetUpgradePkgInfoByVersionAndReleaseDist ¶
func (obclusterService *ObclusterService) GetUpgradePkgInfoByVersionAndReleaseDist(name, version, releaseDist, arch string) (pkgInfo oceanbase.UpgradePkgInfo, err error)
func (*ObclusterService) GetZone ¶
func (obclusterService *ObclusterService) GetZone(zoneName string) (zone *oceanbase.DbaObZones, err error)
func (*ObclusterService) GetZoneCount ¶
func (obclusterService *ObclusterService) GetZoneCount() (count int, err error)
func (*ObclusterService) HasOtherStopTask ¶
func (obclusterService *ObclusterService) HasOtherStopTask(excludeZone string) (bool, error)
HasOtherStopTask returns true if there has other zone which is stopped or has stopped server.
func (*ObclusterService) HasUnitInZone ¶
func (ObclusterService *ObclusterService) HasUnitInZone(zone string) (exist bool, err error)
func (*ObclusterService) InitializeClusterStatusForLock ¶
func (obclusterService *ObclusterService) InitializeClusterStatusForLock() error
func (*ObclusterService) IsLsCheckpointAfterTs ¶
func (obclusterService *ObclusterService) IsLsCheckpointAfterTs(server oceanbase.OBServer) (checkpintScn uint64, err error)
IsLsCheckpointAfterTs will check the smallest checkpoint of the log stream of on the target server.
func (*ObclusterService) IsLsMultiPaxosAlive ¶
func (ObclusterService *ObclusterService) IsLsMultiPaxosAlive(lsId int, tenantId int, svrInfo meta.ObserverSvrInfo) (bool, error)
func (*ObclusterService) IsServerExist ¶
func (obclusterService *ObclusterService) IsServerExist(ip string, port string) (bool, error)
func (*ObclusterService) IsServerExistWithZone ¶
func (*ObclusterService) IsZoneActive ¶
func (obclusterService *ObclusterService) IsZoneActive(zone string) (bool, error)
func (*ObclusterService) IsZoneExist ¶
func (obclusterService *ObclusterService) IsZoneExist(zone string) (res bool, err error)
func (*ObclusterService) IsZoneExistInOB ¶
func (obclusterService *ObclusterService) IsZoneExistInOB(zone string) (res bool, err error)
func (*ObclusterService) IsZoneInactive ¶
func (obclusterService *ObclusterService) IsZoneInactive(zone string) (bool, error)
func (*ObclusterService) MigrateAllAgentToOb ¶
func (obclusterService *ObclusterService) MigrateAllAgentToOb() (err error)
func (*ObclusterService) MigrateObSysParameter ¶
func (obclusterService *ObclusterService) MigrateObSysParameter() (err error)
func (*ObclusterService) MinorFreeze ¶
func (obclusterService *ObclusterService) MinorFreeze(servers []oceanbase.OBServer) (err error)
MinorFreeze is only for sys tenant, and only support one server.
func (*ObclusterService) ModifyUserPwd ¶
func (obclusterService *ObclusterService) ModifyUserPwd(user, pwd string) (err error)
func (*ObclusterService) RestoreParamsForUpgrade ¶
func (obclusterService *ObclusterService) RestoreParamsForUpgrade(params []oceanbase.ObParameters) (err error)
func (*ObclusterService) StartZone ¶
func (obclusterService *ObclusterService) StartZone(zone string) (err error)
func (*ObclusterService) StopZone ¶
func (obclusterService *ObclusterService) StopZone(zone string) (err error)
StopZone attempts to stop a given zone. It is safe to call this function even if the zone is already stopped (INACTIVE).
func (*ObclusterService) UpdateAllAgentIdentity ¶
func (obclusterService *ObclusterService) UpdateAllAgentIdentity(identity string) (err error)
func (*ObclusterService) UpdateClusterConfig ¶
func (s *ObclusterService) UpdateClusterConfig(config map[string]string, deleteAll bool) (err error)
type ObserverService ¶
type ObserverService struct{}
func (*ObserverService) ClearGlobalConfig ¶
func (s *ObserverService) ClearGlobalConfig() error
func (*ObserverService) ClearObConfig ¶
func (s *ObserverService) ClearObConfig() error
func (*ObserverService) ClearObServerConfig ¶
func (s *ObserverService) ClearObServerConfig() error
func (*ObserverService) ClearObZoneConifg ¶
func (s *ObserverService) ClearObZoneConifg() error
func (*ObserverService) ClearObserverAndZoneConfig ¶
func (s *ObserverService) ClearObserverAndZoneConfig(agent meta.AgentInfoWithZoneInterface) error
func (*ObserverService) DeleteObServerConfig ¶
func (s *ObserverService) DeleteObServerConfig(agent meta.AgentInfoInterface) error
func (*ObserverService) DeleteObZoneConifg ¶
func (s *ObserverService) DeleteObZoneConifg(zone string) error
func (*ObserverService) GetOBIntParatemerByName ¶
func (s *ObserverService) GetOBIntParatemerByName(name string) (value int, err error)
func (*ObserverService) GetOBParatemerByName ¶
func (s *ObserverService) GetOBParatemerByName(name string, value interface{}) (err error)
func (*ObserverService) GetOBStringParatemerByName ¶
func (s *ObserverService) GetOBStringParatemerByName(name string) (value string, err error)
func (*ObserverService) GetObConfigByName ¶
func (s *ObserverService) GetObConfigByName(name string) (config sqlite.ObConfig, err error)
func (*ObserverService) GetObConfigMap ¶
func (s *ObserverService) GetObConfigMap() (res map[string]string, err error)
func (*ObserverService) GetObGlobalConfig ¶
func (s *ObserverService) GetObGlobalConfig() (config []sqlite.ObGlobalConfig, err error)
func (*ObserverService) GetObGlobalConfigByName ¶
func (s *ObserverService) GetObGlobalConfigByName(name string) (config sqlite.ObGlobalConfig, err error)
func (*ObserverService) GetObGlobalConfigMap ¶
func (s *ObserverService) GetObGlobalConfigMap() (map[string]sqlite.ObConfig, error)
func (*ObserverService) GetObServerConfig ¶
func (s *ObserverService) GetObServerConfig(agentInfo meta.AgentInfoInterface) (config []sqlite.ObServerConfig, err error)
func (*ObserverService) GetObServerConfigMap ¶
func (s *ObserverService) GetObServerConfigMap(agentInfo meta.AgentInfoInterface) (map[string]sqlite.ObConfig, error)
func (*ObserverService) GetObZoneConfig ¶
func (s *ObserverService) GetObZoneConfig(zone string) (config []sqlite.ObZoneConfig, err error)
func (*ObserverService) GetObZoneConfigMap ¶
func (*ObserverService) PatchGlobalConfig ¶
func (s *ObserverService) PatchGlobalConfig(globalConfig []*sqlite.ObGlobalConfig) (err error)
func (*ObserverService) PatchObConfig ¶
func (s *ObserverService) PatchObConfig(params map[string]string) (err error)
func (*ObserverService) PatchObZoneConfig ¶
func (s *ObserverService) PatchObZoneConfig(configs []*sqlite.ObZoneConfig) (err error)
func (*ObserverService) PatchObserverConfig ¶
func (s *ObserverService) PatchObserverConfig(configs []*sqlite.ObServerConfig) (err error)
func (*ObserverService) PutObConfig ¶
func (s *ObserverService) PutObConfig(params map[string]string) (err error)
func (*ObserverService) UpdateGlobalConfig ¶
func (s *ObserverService) UpdateGlobalConfig(config map[string]string, deleteAll bool) (err error)
func (*ObserverService) UpdateServerConfig ¶
func (s *ObserverService) UpdateServerConfig(config map[string]string, agentList []meta.AgentInfoInterface, deleteAll bool) (err error)
func (*ObserverService) UpdateZoneConfig ¶
Click to show internal directories.
Click to hide internal directories.