Documentation ¶
Index ¶
- func FsIdGenerator(cluster *SharedStorageCluster) (string, error)
- func GetParamValue(paramItems map[string]*commondomain.ParamItem, paramName string) (*commondomain.ParamItem, error)
- type ILocalStorageClusterRepository
- type ISharedStorageClusterRepository
- type LocalStorageCluster
- type SharedStorageCluster
- func (cluster *SharedStorageCluster) AddInsToClusterManager(ctx context.Context, rwInsId string, roInsIds ...string) error
- func (cluster *SharedStorageCluster) ConvertTempRoForRwToRo() string
- func (cluster *SharedStorageCluster) DeleteOldIns(ctx context.Context, physicalId string, newInsId string, ...) error
- func (cluster *SharedStorageCluster) EnsureInsTypeMeta(ctx context.Context) error
- func (cluster *SharedStorageCluster) FlushClusterParams(ctx context.Context) (needRestart bool, err error)
- func (cluster *SharedStorageCluster) FlushParamsIfNecessary(ctx context.Context) error
- func (cluster *SharedStorageCluster) GenerateTempRoIds(ctx context.Context, physicalInsIds ...string) error
- func (cluster *SharedStorageCluster) GrowStorage(ctx context.Context) error
- func (cluster *SharedStorageCluster) Init(paramsTemplateQuery commondomain.IEngineParamsTemplateQuery, ...)
- func (cluster *SharedStorageCluster) InitDbInsMeta() error
- func (cluster *SharedStorageCluster) InitMeta() (err error)
- func (cluster *SharedStorageCluster) InitTempRoInsMeta(ctx context.Context) error
- func (cluster *SharedStorageCluster) RemoveInsFromClusterManager(ctx context.Context, insIds ...string) error
- func (cluster *SharedStorageCluster) RestartCluster(ctx context.Context) error
- func (cluster *SharedStorageCluster) RestartIns(ctx context.Context, insId string) error
- func (cluster *SharedStorageCluster) SetInsState(ctx context.Context, clientEndpoint, state, startAt, reason string) (bool, error)
- func (cluster *SharedStorageCluster) SetRw(ctx context.Context, newRwEndpoint string) (bool, error)
- func (cluster *SharedStorageCluster) SwitchNewRoToRw(ctx context.Context) (newRwId string, err error)
- func (cluster *SharedStorageCluster) Switchover(ctx context.Context, newRwInsId string) error
- func (cluster *SharedStorageCluster) SyncInsStateFromClusterManager(ctx context.Context) (bool, error)
- func (cluster *SharedStorageCluster) WaitForEngineReady(ctx context.Context, resourceName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FsIdGenerator ¶
func FsIdGenerator(cluster *SharedStorageCluster) (string, error)
func GetParamValue ¶
func GetParamValue(paramItems map[string]*commondomain.ParamItem, paramName string) (*commondomain.ParamItem, error)
Types ¶
type ILocalStorageClusterRepository ¶
type ILocalStorageClusterRepository interface { /** * @Description: 获得所有LocalStorageCluster元数据 * @return []domain.LocalStorageCluster * @return error */ GetAll() ([]*LocalStorageCluster, error) /** * @Description: 根据名称获取LocalStorageCluster元数据 * @param name * @param namespace * @return *domain.LocalStorageCluster */ GetByName(name, namespace string) (*LocalStorageCluster, error) /** * @Description: 根据视图模型获取LocalStorageCluster元数据 * @param data * @return *domain.LocalStorageCluster */ GetByData(data interface{}, useModifyClass bool, useUpgradeVersion bool) *LocalStorageCluster /** * @Description: 创建LocalStorageCluster * @param *domain.LocalStorageCluster * @return error */ Create(*LocalStorageCluster) error /** * @Description: 更新LocalStorageCluster * @param *domain.LocalStorageCluster * @return error */ Update(*LocalStorageCluster) error /** * @Description: 将LocalStorageCluster状态设置为Running * @param name * @param namespace * @return error */ UpdateRunningStatus(name, namespace string) error }
*
- @Description: LocalStorageCluster元数据存储
type ISharedStorageClusterRepository ¶
type ISharedStorageClusterRepository interface { SharedStorageCluster, error) GetByName(name, namespace string) (*SharedStorageCluster, error) GetByData(data interface{}, useModifyClass bool, useUpgradeVersion bool) *SharedStorageCluster Create(*SharedStorageCluster) error Update(*SharedStorageCluster) error UpdateRunningStatus(name, namespace string) error UpdateInsStatus(*SharedStorageCluster) error }GetAll() ([]*
*
- @Description: SharedStorageCluster元数据存储
type LocalStorageCluster ¶
type LocalStorageCluster struct { commondomain.DbClusterBase RoReplicas int Port int Ins *commondomain.DbIns FollowerIns []*commondomain.DbIns // contains filtered or unexported fields }
func (*LocalStorageCluster) Init ¶
func (cluster *LocalStorageCluster) Init( podManager commondomain.IEnginePodManager, idGeneragor commondomain.IIdGenerator, portGenerator commondomain.IPortGenerator, managerClient commondomain.IManagerClient, logger logr.Logger, )
func (*LocalStorageCluster) InitDbInsMeta ¶
func (cluster *LocalStorageCluster) InitDbInsMeta() error
type SharedStorageCluster ¶
type SharedStorageCluster struct { // contains filtered or unexported fields }
func (*SharedStorageCluster) AddInsToClusterManager ¶
func (*SharedStorageCluster) ConvertTempRoForRwToRo ¶
func (cluster *SharedStorageCluster) ConvertTempRoForRwToRo() string
func (*SharedStorageCluster) DeleteOldIns ¶
func (*SharedStorageCluster) EnsureInsTypeMeta ¶
func (cluster *SharedStorageCluster) EnsureInsTypeMeta(ctx context.Context) error
func (*SharedStorageCluster) FlushClusterParams ¶
func (cluster *SharedStorageCluster) FlushClusterParams(ctx context.Context) (needRestart bool, err error)
*
- @Description: 执行刷参
- @receiver ins
- @return error
func (*SharedStorageCluster) FlushParamsIfNecessary ¶
func (cluster *SharedStorageCluster) FlushParamsIfNecessary(ctx context.Context) error
func (*SharedStorageCluster) GenerateTempRoIds ¶
func (cluster *SharedStorageCluster) GenerateTempRoIds(ctx context.Context, physicalInsIds ...string) error
func (*SharedStorageCluster) GrowStorage ¶
func (cluster *SharedStorageCluster) GrowStorage(ctx context.Context) error
func (*SharedStorageCluster) Init ¶
func (cluster *SharedStorageCluster) Init( paramsTemplateQuery commondomain.IEngineParamsTemplateQuery, paramsClassQuery commondomain.IEngineParamsClassQuery, paramsRepo commondomain.IEngineParamsRepository, minorVersionQuery commondomain.IMinorVersionQuery, accountRepo commondomain.IAccountRepository, idGenerator commondomain.IIdGenerator, portGenerator commondomain.IPortGenerator, storageManager commondomain.IStorageManager, classQuery commondomain.IClassQuery, clusterManagerClient commondomain.IClusterManagerClient, managerClient commondomain.IManagerClient, podManager commondomain.IEnginePodManager, cmRemover commondomain.IClusterManagerRemover, logger logr.Logger, )
func (*SharedStorageCluster) InitDbInsMeta ¶
func (cluster *SharedStorageCluster) InitDbInsMeta() error
func (*SharedStorageCluster) InitMeta ¶
func (cluster *SharedStorageCluster) InitMeta() (err error)
func (*SharedStorageCluster) InitTempRoInsMeta ¶
func (cluster *SharedStorageCluster) InitTempRoInsMeta(ctx context.Context) error
func (*SharedStorageCluster) RemoveInsFromClusterManager ¶
func (cluster *SharedStorageCluster) RemoveInsFromClusterManager(ctx context.Context, insIds ...string) error
func (*SharedStorageCluster) RestartCluster ¶
func (cluster *SharedStorageCluster) RestartCluster(ctx context.Context) error
func (*SharedStorageCluster) RestartIns ¶
func (cluster *SharedStorageCluster) RestartIns(ctx context.Context, insId string) error
func (*SharedStorageCluster) SetInsState ¶
func (*SharedStorageCluster) SwitchNewRoToRw ¶
func (cluster *SharedStorageCluster) SwitchNewRoToRw(ctx context.Context) (newRwId string, err error)
func (*SharedStorageCluster) Switchover ¶
func (cluster *SharedStorageCluster) Switchover(ctx context.Context, newRwInsId string) error
func (*SharedStorageCluster) SyncInsStateFromClusterManager ¶
func (cluster *SharedStorageCluster) SyncInsStateFromClusterManager(ctx context.Context) (bool, error)
func (*SharedStorageCluster) WaitForEngineReady ¶
func (cluster *SharedStorageCluster) WaitForEngineReady(ctx context.Context, resourceName string) error
Click to show internal directories.
Click to hide internal directories.