controller

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddToManagerFuncs []func(manager.Manager) error

AddToManagerFuncs is a list of functions to add all Controllers to the Manager

Functions

func AddToManager

func AddToManager(m manager.Manager) error

AddToManager adds all Controllers to the Manager

Types

type IMetricsController

type IMetricsController interface {
	//RestController
	BaseMetric(ctx *gin.Context)
	StoragePoolUseMetric(ctx *gin.Context)
	NodeStorageUseMetric(ctx *gin.Context)
	ModuleStatusMetric(ctx *gin.Context)
	OperationList(ctx *gin.Context)
}

func NewMetricsController

func NewMetricsController(m *manager.ServerManager) IMetricsController

type INodeController

type INodeController interface {
	//RestController
	StorageNodeGet(ctx *gin.Context)
	StorageNodeList(ctx *gin.Context)
	StorageNodeMigrateGet(ctx *gin.Context)
	StorageNodeDisksList(ctx *gin.Context)
	StorageNodeVolumeOperationYamlGet(ctx *gin.Context)
}

func NewNodeController

func NewNodeController(m *manager.ServerManager) INodeController

type IPoolController

type IPoolController interface {
	//RestController
	StoragePoolGet(ctx *gin.Context)
	StoragePoolList(ctx *gin.Context)
	StorageNodesGetByPoolName(ctx *gin.Context)
	StorageNodeDisksGetByPoolName(ctx *gin.Context)
}

func NewPoolController

func NewPoolController(m *manager.ServerManager) IPoolController

type ISettingController

type ISettingController interface {
	//RestController
	EnableDRBDSetting(ctx *gin.Context)
	DRBDSettingGet(ctx *gin.Context)
}

func NewSettingController

func NewSettingController(m *manager.ServerManager) ISettingController

type IVolumeController

type IVolumeController interface {
	//RestController
	VolumeGet(ctx *gin.Context)
	VolumeList(ctx *gin.Context)
	VolumeReplicasGet(ctx *gin.Context)
	VolumeReplicaYamlGet(ctx *gin.Context)
	VolumeOperationGet(ctx *gin.Context)
	VolumeOperationYamlGet(ctx *gin.Context)
}

func NewVolumeController

func NewVolumeController(m *manager.ServerManager) IVolumeController

type MetricsController

type MetricsController struct {
	// contains filtered or unexported fields
}

MetricsController

func (*MetricsController) BaseMetric

func (v *MetricsController) BaseMetric(ctx *gin.Context)

Get godoc @Summary 摘要 获取基础监控指标 @Description get baseMetric @Tags Metric @Param name query string false "name" @Accept application/json @Produce application/json @Success 200 {object} api.BaseMetric "成功" @Router /metrics/basemetric [get]

func (*MetricsController) ModuleStatusMetric

func (v *MetricsController) ModuleStatusMetric(ctx *gin.Context)

ModuleStatusMetric godoc @Summary 摘要 获取组件状态监控指标 @Description ModuleStatusMetric Running (运行中) / NotReady (未就绪) @Tags Metric @Param name query string false "name" @Accept json @Produce json @Success 200 {object} api.ModuleStatusMetric "成功" @Router /metrics/modulestatusmetric [get]

func (*MetricsController) NodeStorageUseMetric

func (v *MetricsController) NodeStorageUseMetric(ctx *gin.Context)

NodeStorageUseMetric godoc @Summary 摘要 获取指定存储池类型节点存储TOP5使用率监控指标 @Description NodeStorageUseMetric @Tags Metric @Param storagePoolClass path string true "storagePoolClass" @Accept json @Produce json @Success 200 {object} api.NodeStorageUseMetric "成功" @Failure 404 {object} api.NodeStorageUseMetric "失败" @Router /metrics/nodestorageusemetric/{storagePoolClass} [get]

func (*MetricsController) OperationList

func (v *MetricsController) OperationList(ctx *gin.Context)

OperationList godoc @Summary 摘要 获取操作记录列表 @Description OperationList 状态枚举 (Submitted、AddReplica、SyncReplica、PruneReplica、InProgress、Completed、ToBeAborted、Cancelled、Aborted、Failed) @Tags Metric @Param name query string false "name" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Accept json @Produce json @Success 200 {object} api.OperationMetric "成功" @Router /metrics/operations [get]

func (*MetricsController) StoragePoolUseMetric

func (v *MetricsController) StoragePoolUseMetric(ctx *gin.Context)

StoragePoolMetric godoc @Summary 摘要 获取存储池资源监控指标 @Description StoragePoolMetric @Tags Metric @Param name query string false "name" @Accept json @Produce json @Success 200 {object} api.StoragePoolUseMetric "成功" @Router /metrics/storagepoolusemetric [get]

type NodeController

type NodeController struct {
	// contains filtered or unexported fields
}

NodeController

func (*NodeController) StorageNodeDisksList

func (n *NodeController) StorageNodeDisksList(ctx *gin.Context)

StorageNodeDisksList godoc @Summary 摘要 获取指定存储节点磁盘列表 @Description list StorageNodeDisks @Tags Node @Param nodeName path string true "nodeName" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Accept json @Produce json @Success 200 {object} api.LocalDiskListByNode @Router /nodes/storagenode/{nodeName}/disks [get]

func (*NodeController) StorageNodeGet

func (n *NodeController) StorageNodeGet(ctx *gin.Context)

StorageNodeGet godoc @Summary 摘要 获取指定存储节点 @Description get StorageNode 驱动状态 [运行中(Ready),维护中(Maintain), 离线(Offline)] , 节点状态 [运行中(Ready),未就绪(NotReady),未知(Unknown)] @Tags Node @Param name path string false "name" @Accept json @Produce json @Success 200 {object} api.StorageNode @Router /nodes/storagenodes/{name} [get]

func (*NodeController) StorageNodeList

func (n *NodeController) StorageNodeList(ctx *gin.Context)

StorageNodeList godoc @Summary 摘要 获取存储节点列表 @Description list StorageNode 驱动状态 [运行中(Ready),维护中(Maintain), 离线(Offline)] , 节点状态 [运行中(Ready),未就绪(NotReady),未知(Unknown)] @Tags Node @Param name query string false "name" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Accept json @Produce json @Success 200 {object} api.StorageNodeList @Router /nodes/storagenodes [get]

func (*NodeController) StorageNodeMigrateGet

func (n *NodeController) StorageNodeMigrateGet(ctx *gin.Context)

StorageNodeMigrateGet godoc @Summary 摘要 获取指定节点数据卷迁移任务列表 @Description get StorageNodeMigrate @Tags Node @Param nodeName path string true "nodeName" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Accept json @Produce json @Success 200 {object} api.VolumeOperationListByNode @Router /nodes/storagenode/{nodeName}/migrates [get]

func (*NodeController) StorageNodeVolumeOperationYamlGet

func (n *NodeController) StorageNodeVolumeOperationYamlGet(ctx *gin.Context)

StorageNodeVolumeOperationYamlGet godoc @Summary 摘要 获取节点数据卷操作记录yaml信息 @Description get StorageNodeVolumeOperationYamlGet @Tags Node @Param migrateOperationName path string true "migrateOperationName" @Accept json @Produce json @Success 200 {object} api.YamlData "成功" @Router /nodes/storagenodeoperations/{migrateOperationName}/yaml [get]

type PoolController

type PoolController struct {
	// contains filtered or unexported fields
}

PoolController

func (*PoolController) StorageNodeDisksGetByPoolName

func (n *PoolController) StorageNodeDisksGetByPoolName(ctx *gin.Context)

StorageNodeDisksGetByPoolName godoc @Summary 摘要 获取指定存储池指定存储节点磁盘列表信息 @Description get StorageNodeDisksGetByPoolName @Tags Pool @Param nodeName path string true "nodeName" @Param storagePoolName path string true "storagePoolName" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Accept json @Produce json @Success 200 {object} api.NodeDiskListByPool @Router /pools/storagepool/{storagePoolName}/nodes/{nodeName}/disks [get]

func (*PoolController) StorageNodesGetByPoolName

func (n *PoolController) StorageNodesGetByPoolName(ctx *gin.Context)

StorageNodesGetByPoolName godoc @Summary 摘要 获取指定存储池存储节点列表信息 @Description get StorageNodesGetByPoolName @Tags Pool @Param storagePoolName path string true "storagePoolName" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Accept json @Produce json @Success 200 {object} api.StorageNodeListByPool @Router /pools/storagepool/{storagePoolName}/nodes [get]

func (*PoolController) StoragePoolGet

func (n *PoolController) StoragePoolGet(ctx *gin.Context)

StoragePoolGet godoc @Summary 摘要 获取指定存储池基本信息 @Description get Pool @Tags Pool @Param name path string true "name" @Accept json @Produce json @Success 200 {object} api.StoragePool @Router /pools/storagepools/{name} [get]

func (*PoolController) StoragePoolList

func (n *PoolController) StoragePoolList(ctx *gin.Context)

StoragePoolList godoc @Summary 摘要 获取存储池列表信息 @Description list StoragePools @Tags Pool @Param name query string false "name" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Accept json @Produce json @Success 200 {object} api.StoragePoolList @Router /pools/storagepools [get]

type RestController

type RestController interface {
	Get(ctx *gin.Context)
	List(ctx *gin.Context)
}

type SettingController

type SettingController struct {
	// contains filtered or unexported fields
}

SettingController

func (*SettingController) DRBDSettingGet

func (n *SettingController) DRBDSettingGet(ctx *gin.Context)

DRBDSettingGet godoc @Summary 摘要 获取高可用设置 @Description get DRBDSettingGet @Tags Setting @Param enabledrbd path string false "enabledrbd" @Accept json @Produce json @Success 200 {object} api.DrbdEnableSetting @Router /settings/highavailabilitysetting [get]

func (*SettingController) EnableDRBDSetting

func (n *SettingController) EnableDRBDSetting(ctx *gin.Context)

EnableDRBDSetting godoc @Summary 摘要 高可用设置 @Description post EnableDRBDSetting @Tags Setting @Param enabledrbd path string true "enabledrbd" @Accept json @Produce json @Success 200 {object} api.DrbdEnableSetting @Router /settings/highavailabilitysetting/{enabledrbd} [post]

type VolumeController

type VolumeController struct {
	// contains filtered or unexported fields
}

VolumeController

func (*VolumeController) VolumeGet

func (v *VolumeController) VolumeGet(ctx *gin.Context)

VolumeGet godoc @Summary 摘要 获取指定数据卷基本信息 @Description get Volume @Tags Volume @Param name path string true "name" @Accept application/json @Produce application/json @Success 200 {object} api.Volume @Router /volumes/volumes/{name} [get]

func (*VolumeController) VolumeList

func (v *VolumeController) VolumeList(ctx *gin.Context)

VolumeList godoc @Summary 摘要 获取数据卷列表信息 @Description list Volume @Tags Volume @Param name query string false "name" @Param page query int32 true "page" @Param pageSize query int32 true "pageSize" @Accept json @Produce json @Success 200 {object} api.VolumeList "成功" @Router /volumes/volumes [get]

func (*VolumeController) VolumeOperationGet

func (v *VolumeController) VolumeOperationGet(ctx *gin.Context)

VolumeOperationGet godoc @Summary 摘要 获取指定数据卷操作记录信息(目前仅包含迁移运维操作) @Description get VolumeOperation @Tags Volume @Param volumeName path string true "volumeName" @Accept json @Produce json @Success 200 {object} api.VolumeOperationByVolume "成功" @Router /volumes/volumeoperations/{volumeName} [get]

func (*VolumeController) VolumeOperationYamlGet

func (v *VolumeController) VolumeOperationYamlGet(ctx *gin.Context)

VolumeOperationYamlGet godoc @Summary 摘要 获取数据卷操作记录yaml信息 @Description get VolumeOperationYamlGet @Tags Volume @Param volumeOperationName path string true "volumeOperationName" @Accept json @Produce json @Success 200 {object} api.YamlData "成功" @Router /volumes/volumeoperation/{volumeOperationName}/yaml [get]

func (*VolumeController) VolumeReplicaYamlGet

func (v *VolumeController) VolumeReplicaYamlGet(ctx *gin.Context)

VolumeReplicaYamlGet godoc @Summary 摘要 查看指定数据卷副本yaml信息 @Description get VolumeReplicaYaml @Tags Volume @Param volumeReplicaName path string true "volumeReplicaName" @Accept json @Produce json @Success 200 {object} api.YamlData "成功" @Router /volumes/volumereplica/{volumeReplicaName}/yaml [get]

func (*VolumeController) VolumeReplicasGet

func (v *VolumeController) VolumeReplicasGet(ctx *gin.Context)

VolumeReplicasGet godoc @Summary 摘要 获取指定数据卷的副本列表信息 @Description list volumes @Tags Volume @Param volumeName path string true "volumeName" @Accept json @Produce json @Success 200 {object} api.VolumeReplicaList "成功" @Router /volumes/volumereplicas/{volumeName} [get]

Jump to

Keyboard shortcuts

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