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: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NodePort      = "17220"
	PathPartition = "/getPartitions"
)

Variables

This section is empty.

Functions

func Add

func Add(c *gin.Context, clusterAddr string, input *AddInput) (interface{}, error)

func Decommission

func Decommission(c *gin.Context, clusterAddr, addr string) (interface{}, error)

func Get

func Get(c *gin.Context, clusterNode, addr string) (*proto.MetaNodeInfo, error)

func Migrate

func Migrate(c *gin.Context, clusterAddr, srcAddr, targetAddr string) error

Types

type AddInput

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

type Partition

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

type PartitionsData

type PartitionsData map[string]Partition

func GetPartitions

func GetPartitions(c *gin.Context, nodeAddr string) (*PartitionsData, error)

Jump to

Keyboard shortcuts

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