Documentation ¶
Overview ¶
Package client implements client.
Index ¶
- type Client
- type Config
- type Op
- type OpOption
- func WithBlockchainSpecs(blockchainSpecs []*rpcpb.BlockchainSpec) OpOption
- func WithChainConfigs(chainConfigs map[string]string) OpOption
- func WithCustomNodeConfigs(customNodeConfigs map[string]string) OpOption
- func WithDynamicPorts(dynamicPorts bool) OpOption
- func WithExecPath(execPath string) OpOption
- func WithGlobalNodeConfig(nodeConfig string) OpOption
- func WithNumNodes(numNodes uint32) OpOption
- func WithNumSubnets(numSubnets uint32) OpOption
- func WithPluginDir(pluginDir string) OpOption
- func WithReassignPortsIfUsed(reassignPortsIfUsed bool) OpOption
- func WithRootDataDir(rootDataDir string) OpOption
- func WithSubnetConfigs(subnetConfigs map[string]string) OpOption
- func WithTrackSubnets(trackSubnets string) OpOption
- func WithUpgradeConfigs(upgradeConfigs map[string]string) OpOption
- func WithWhitelistedSubnets(trackSubnets 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) RPCVersion(ctx context.Context) (*rpcpb.RPCVersionResponse, error) Start(ctx context.Context, execPath string, opts ...OpOption) (*rpcpb.StartResponse, error) CreateBlockchains(ctx context.Context, blockchainSpecs []*rpcpb.BlockchainSpec) (*rpcpb.CreateBlockchainsResponse, error) CreateSubnets(ctx context.Context, subnetSpecs []*rpcpb.SubnetSpec) (*rpcpb.CreateSubnetsResponse, error) TransformElasticSubnets(ctx context.Context, elasticSubnetSpecs []*rpcpb.ElasticSubnetSpec) (*rpcpb.TransformElasticSubnetsResponse, error) AddPermissionlessValidator(ctx context.Context, validatorSpec []*rpcpb.PermissionlessValidatorSpec) (*rpcpb.AddPermissionlessValidatorResponse, error) RemoveSubnetValidator(ctx context.Context, validatorSpec []*rpcpb.RemoveSubnetValidatorSpec) (*rpcpb.RemoveSubnetValidatorResponse, error) Health(ctx context.Context) (*rpcpb.HealthResponse, error) WaitForHealthy(ctx context.Context) (*rpcpb.WaitForHealthyResponse, 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) PauseNode(ctx context.Context, name string) (*rpcpb.PauseNodeResponse, error) ResumeNode(ctx context.Context, name string) (*rpcpb.ResumeNodeResponse, 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 SaveSnapshot(ctx context.Context, snapshotName string) (*rpcpb.SaveSnapshotResponse, error) LoadSnapshot(ctx context.Context, snapshotName string, opts ...OpOption) (*rpcpb.LoadSnapshotResponse, error) RemoveSnapshot(ctx context.Context, snapshotName string) (*rpcpb.RemoveSnapshotResponse, error) GetSnapshotNames(ctx context.Context) ([]string, error) }
type OpOption ¶
type OpOption func(*Op)
func WithBlockchainSpecs ¶
func WithBlockchainSpecs(blockchainSpecs []*rpcpb.BlockchainSpec) OpOption
Slice of BlockchainSpec
func WithChainConfigs ¶
Map from chain name to its configuration json contents.
func WithCustomNodeConfigs ¶
Map from node name to its custom node config
func WithDynamicPorts ¶
func WithExecPath ¶
func WithGlobalNodeConfig ¶
func WithNumNodes ¶
func WithNumSubnets ¶
func WithPluginDir ¶
func WithReassignPortsIfUsed ¶
func WithRootDataDir ¶
func WithSubnetConfigs ¶
Map from subnet id to its configuration json contents.
func WithTrackSubnets ¶
func WithUpgradeConfigs ¶
Map from chain name to its upgrade json contents.
func WithWhitelistedSubnets ¶
Click to show internal directories.
Click to hide internal directories.