cluster

package
v1.5.0-beta Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultClusterID = "default"
)

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Uuid       string
	Name       string
	Resume     string
	Cluster    string
	Creator    string
	Updater    string
	Status     int
	CreateTime time.Time
	UpdateTime time.Time
}

func FromEntity

func FromEntity(entity *cluster.Cluster) *Cluster

type IClusterService

type IClusterService interface {
	CountByPartition(ctx context.Context) (map[string]int, error)
	List(ctx context.Context, clusterIds ...string) ([]*Cluster, error)
	ListByClusters(ctx context.Context, ids ...string) ([]*Cluster, error)
	Search(ctx context.Context, keyword string, clusterId ...string) ([]*Cluster, error)
	Create(ctx context.Context, name string, resume string, address string) (*Cluster, error)
	UpdateInfo(ctx context.Context, id string, name *string, resume *string) (*Cluster, error)
	UpdateAddress(ctx context.Context, id string, address string) ([]*Node, error)
	Nodes(ctx context.Context, clusterIds ...string) ([]*Node, error)
	GatewayClient(ctx context.Context, id string) (gateway.IClientDriver, error)
	Get(ctx context.Context, id string) (*Cluster, error)
	Delete(ctx context.Context, id string) error
}

type Node

type Node struct {
	Uuid       string
	Name       string
	Cluster    string
	Peer       []string
	Admin      []string
	Server     []string
	CreateTime time.Time
}

Jump to

Keyboard shortcuts

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