metanode

package
v0.0.0-...-18a434d Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(c *gin.Context)

func Decommission

func Decommission(c *gin.Context)

func List

func List(c *gin.Context)

func Migrate

func Migrate(c *gin.Context)

func Partitions

func Partitions(c *gin.Context)

Types

type AddInput

type AddInput struct {
	Id       string `json:"id" binding:"required"`
	ZoneName string `json:"zone_name" binding:"required"`
	Addr     string `json:"addr" binding:"required"`
}

type DecommissionInput

type DecommissionInput struct {
	Addrs []string `json:"addrs" binding:"required,gte=1"`
}

type ListInput

type ListInput struct {
	Node      string `form:"node"`
	NodeSetId uint64 `form:"node_set_id"`
	Sort      string `form:"sort"` // asc, desc
}

type ListOutput

type ListOutput struct {
	ID                 uint64    `json:"id"`
	Addr               string    `json:"addr"`
	Status             string    `json:"status"`
	ZoneName           string    `json:"zone_name"`
	Total              string    `json:"total"`
	Used               string    `json:"used"`
	Available          string    `json:"available"`
	UsageRatio         string    `json:"usage_ratio"`
	ReportTime         time.Time `json:"report_time"`
	MetaPartitionCount int       `json:"partition_count"`
	Writable           bool      `json:"writable"`
	WritableStr        string    `json:"writable_str,omitempty"`
	RdOnly             bool      `json:"rd_only"`
	NodeSetId          uint64    `json:"node_set_id"`
}

type MigrateInput

type MigrateInput struct {
	SrcAddr    string `json:"src_addr" binding:"required"`
	TargetAddr string `json:"target_addr" binding:"required"`
}

type PartitionInput

type PartitionInput struct {
	NodeAddr string `form:"addr" binding:"required"`
	Id       uint64 `form:"id"`
}

type PartitionOutput

type PartitionOutput struct {
	PartitionId uint64      `json:"partition_id"`
	VolName     string      `json:"vol_name"`
	Start       uint64      `json:"start"`
	End         string      `json:"end"`
	Peers       interface{} `json:"peers"`
}

Jump to

Keyboard shortcuts

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