Documentation
¶
Overview ¶
Package client implements client.
Index ¶
- type Client
- type Config
- type Op
- type OpOption
- func WithCustomNodeConfigs(customNodeConfigs map[string]string) OpOption
- func WithCustomVMs(customVMs map[string]string) OpOption
- func WithExecPath(execPath string) OpOption
- func WithGlobalNodeConfig(nodeConfig string) OpOption
- func WithLogLevel(logLevel string) OpOption
- func WithNumNodes(numNodes uint32) OpOption
- func WithPluginDir(pluginDir string) OpOption
- func WithRootDataDir(rootDataDir string) OpOption
- func WithWhitelistedSubnets(whitelistedSubnets string) OpOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Ping(ctx context.Context) (*rpcpb.PingResponse, error) Start(ctx context.Context, execPath string, opts ...OpOption) (*rpcpb.StartResponse, error) Health(ctx context.Context) (*rpcpb.HealthResponse, error) URIs(ctx context.Context) ([]string, error) Status(ctx context.Context) (*rpcpb.StatusResponse, error) StreamStatus(ctx context.Context, pushInterval time.Duration) (<-chan *rpcpb.ClusterInfo, error) RemoveNode(ctx context.Context, name string) (*rpcpb.RemoveNodeResponse, error) RestartNode(ctx context.Context, name string, opts ...OpOption) (*rpcpb.RestartNodeResponse, error) AddNode(ctx context.Context, name string, execPath string, opts ...OpOption) (*rpcpb.AddNodeResponse, error) Stop(ctx context.Context) (*rpcpb.StopResponse, error) AttachPeer(ctx context.Context, nodeName string) (*rpcpb.AttachPeerResponse, error) SendOutboundMessage(ctx context.Context, nodeName string, peerID string, op uint32, msgBody []byte) (*rpcpb.SendOutboundMessageResponse, error) Close() error }
type OpOption ¶
type OpOption func(*Op)
func WithCustomNodeConfigs ¶
Map from node name to its custom node config
func WithCustomVMs ¶
Map from VM name to its genesis path.
func WithExecPath ¶
func WithGlobalNodeConfig ¶
func WithLogLevel ¶
func WithNumNodes ¶
func WithPluginDir ¶
func WithRootDataDir ¶
func WithWhitelistedSubnets ¶
Click to show internal directories.
Click to hide internal directories.