cluster

package
v0.0.0-...-e6fd437 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(c *gin.Context)

func List

func List(c *gin.Context)

func Update

func Update(c *gin.Context)

Types

type Cluster

type Cluster struct {
	model.Cluster       `json:",inline"`
	OriginalName        string                   `json:"original_name"`
	LeaderAddr          string                   `json:"leader_addr"`
	MetaNodeSum         int                      `json:"meta_node_sum"`
	MetaTotal           string                   `json:"meta_total"`
	MetaUsed            string                   `json:"meta_used"`
	MetaUsedRatio       string                   `json:"meta_used_ratio"`
	DataNodeSum         int                      `json:"data_node_sum"`
	DataTotal           string                   `json:"data_total"`
	DataUsed            string                   `json:"data_used"`
	DataUsedRatio       string                   `json:"data_used_ratio"`
	MetaNodes           []proto.NodeView         `json:"meta_nodes,omitempty" `
	DataNodes           []proto.NodeView         `json:"data_nodes,omitempty"`
	BadPartitionIDs     []proto.BadPartitionView `json:"bad_partition_ids"`
	BadMetaPartitionIDs []proto.BadPartitionView `json:"bad_meta_partition_ids"`
}

type CreateInput

type CreateInput struct {
	Name       string         `json:"name" binding:"required"`
	MasterAddr types.StrSlice `json:"master_addr" binding:"required"`
	IDC        string         `json:"idc"`
	Cli        string         `json:"cli"`
	Domain     string         `json:"domain"`
	ConsulAddr string         `json:"consul_addr" binding:"omitempty,url"`
	Tag        string         `json:"tag"`
	S3Endpoint string         `json:"s3_endpoint" binding:"omitempty,url"`
	VolType    enums.VolType  `json:"vol_type"`
}

type ListInput

type ListInput struct {
	Page    int    `form:"page"`
	PerPage int    `form:"per_page"`
	Name    string `form:"name"`
	VolType *int   `form:"vol_type"`
}

func (*ListInput) Check

func (input *ListInput) Check() error

type ListOutput

type ListOutput struct {
	Page     int       `json:"page"`
	PerPage  int       `json:"per_page"`
	Count    int64     `json:"count"`
	Clusters []Cluster `json:"clusters"`
}

type UpdateInput

type UpdateInput struct {
	Id         int64          `json:"id" binding:"required"`
	MasterAddr types.StrSlice `json:"master_addr"`
	IDC        string         `json:"idc"`
	Cli        string         `json:"cli"`
	Domain     string         `json:"domain"`
	ConsulAddr string         `json:"consul_addr" binding:"omitempty,url"`
	Tag        string         `json:"tag"`
	S3Endpoint string         `json:"s3_endpoint" binding:"omitempty,url"`
}

Jump to

Keyboard shortcuts

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