peer

package
v0.0.0-...-46d4b59 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteBrokenCopyset

func DeleteBrokenCopyset(logicalPoolID, copysetID uint32, peer *common.Peer, opts Options) (interface{}, *cmderror.CmdError)

DeleteBrokenCopyset delete broken copyset.

func GetLeader

func GetLeader(logicalPoolID, copysetID uint32, conf Configuration, opts Options) (*common.Peer, *cmderror.CmdError)

GetLeader get leader for the address.

func NewCommand

func NewCommand() *cobra.Command

NewCommand ...

func ParsePeer

func ParsePeer(peer string) (*common.Peer, *cmderror.CmdError)

ParsePeer parse the peer string

Types

type Command

type Command struct {
	basecmd.FinalCurveCmd
	// contains filtered or unexported fields
}

Command the command to perform remove peer.

func (*Command) AddFlags

func (cCmd *Command) AddFlags()

func (*Command) Init

func (cCmd *Command) Init(cmd *cobra.Command, args []string) error

func (*Command) Print

func (cCmd *Command) Print(cmd *cobra.Command, args []string) error

func (*Command) ResultPlainOutput

func (cCmd *Command) ResultPlainOutput() error

func (*Command) RunCommand

func (cCmd *Command) RunCommand(cmd *cobra.Command, args []string) error

type Configuration

type Configuration struct {
	Peers []*common.Peer
}

Configuration the configuration for peer.

func ParseConfiguration

func ParseConfiguration(peers []string) (*Configuration, *cmderror.CmdError)

ParseConfiguration parse the conf string into Configuration

type DeleteBrokenCopysetRPC

type DeleteBrokenCopysetRPC struct {
	Info    *basecmd.Rpc
	Request *copyset.CopysetRequest
	Cli     copyset.CopysetServiceClient
}

DeleteBrokenCopysetRPC the rpc client for the rpc function DeleteBrokenCopyset

func (*DeleteBrokenCopysetRPC) NewRpcClient

func (ufRp *DeleteBrokenCopysetRPC) NewRpcClient(cc grpc.ClientConnInterface)

NewRpcClient ...

func (*DeleteBrokenCopysetRPC) Stub_Func

func (ufRp *DeleteBrokenCopysetRPC) Stub_Func(ctx context.Context) (interface{}, error)

Stub_Func ...

type LeaderRpc

type LeaderRpc struct {
	Info    *basecmd.Rpc
	Request *cli2.GetLeaderRequest2
	Cli     cli2.CliService2Client
}

LeaderRpc the rpc client for the rpc function GetLeader

func (*LeaderRpc) NewRpcClient

func (ufRp *LeaderRpc) NewRpcClient(cc grpc.ClientConnInterface)

NewRpcClient ...

func (*LeaderRpc) Stub_Func

func (ufRp *LeaderRpc) Stub_Func(ctx context.Context) (interface{}, error)

Stub_Func ...

type Options

type Options struct {
	Timeout    time.Duration
	RetryTimes int32
}

Options rpc request options.

type RPCClient

type RPCClient struct {
	Info    *basecmd.Rpc
	Request *cli.RemovePeerRequest
	// contains filtered or unexported fields
}

RPCClient the rpc client for the rpc function RemovePeer

func (*RPCClient) NewRpcClient

func (rpp *RPCClient) NewRpcClient(cc grpc.ClientConnInterface)

func (*RPCClient) Stub_Func

func (rpp *RPCClient) Stub_Func(ctx context.Context) (interface{}, error)

Jump to

Keyboard shortcuts

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