admin

package
v1.2.0-beta Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorInvalidAdminAddress = errors.New("invalid address")
)

Functions

This section is empty.

Types

type IApintoAdmin

type IApintoAdmin interface {
	Ping(ctx context.Context) error
	Info(ctx context.Context) (*Info, error)
	Version(ctx context.Context) (*Version, error)
}

func Admin

func Admin(address ...string) IApintoAdmin

type Info

type Info struct {
	Cluster string  `yaml:"cluster" json:"cluster,omitempty"`
	Nodes   []*Node `yaml:"nodes" json:"nodes,omitempty"`
}

type Node

type Node struct {
	Id     string   `json:"id,omitempty" yaml:"id"`
	Name   string   `json:"name,omitempty" yaml:"name"`
	Peer   []string `json:"peer,omitempty" yaml:"peer"`
	Admin  []string `json:"admin,omitempty" yaml:"admin"`
	Server []string `json:"server,omitempty" yaml:"server"`
	Leader bool     `json:"leader,omitempty" yaml:"leader"`
}

type Version

type Version struct {
}

Jump to

Keyboard shortcuts

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