admin

package
v0.0.0-...-ba0e684 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 7 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	CreateTable(ctx context.Context, tableName string, partitionCount int) error

	DropTable(ctx context.Context, tableName string) error

	ListTables(ctx context.Context) ([]*TableInfo, error)
}

Client provides the administration API to a specific cluster. Remember only the superusers configured to the cluster have the admin priviledges.

func NewClient

func NewClient(cfg Config) Client

NewClient returns an instance of Client.

type Config

type Config struct {
	MetaServers []string `json:"meta_servers"`
}

type RemoteCmdClient

type RemoteCmdClient struct {
	// contains filtered or unexported fields
}

RemoteCmdClient is a client to call remote command to a PegasusServer.

func NewRemoteCmdClient

func NewRemoteCmdClient(addr string, nodeType session.NodeType) *RemoteCmdClient

NewRemoteCmdClient returns an instance of RemoteCmdClient.

func (*RemoteCmdClient) Call

func (c *RemoteCmdClient) Call(ctx context.Context, command string, arguments []string) (cmdResult string, err error)

Call a remote command.

type RemoteCommand

type RemoteCommand struct {
	Command   string
	Arguments []string
}

RemoteCommand can be called concurrently by multiple sessions.

func (*RemoteCommand) Call

func (c *RemoteCommand) Call(ctx context.Context, session session.NodeSession) (cmdResult string, err error)

Call a remote command to an existing session.

type TableInfo

type TableInfo struct {
	Name string

	// Envs is a set of attributes binding to this table.
	Envs map[string]string
}

TableInfo is the table information.

Jump to

Keyboard shortcuts

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