Documentation
¶
Overview ¶
Package driver is a generated GoMock package.
Package driver is a generated GoMock package.
Package driver is a generated GoMock package.
Index ¶
- Constants
- func GetValidatorStakes(validators Validators) []uint64
- func ResolveClientImageName(imageName string) string
- type Application
- type ApplicationConfig
- type MockApplication
- func (m *MockApplication) Config() *ApplicationConfig
- func (m *MockApplication) EXPECT() *MockApplicationMockRecorder
- func (m *MockApplication) GetNumberOfUsers() int
- func (m *MockApplication) GetReceivedTransactions() (uint64, error)
- func (m *MockApplication) GetSentTransactions(user int) (uint64, error)
- func (m *MockApplication) Start(arg0 context.Context) error
- func (m *MockApplication) Stop() error
- type MockApplicationMockRecorder
- func (mr *MockApplicationMockRecorder) Config() *gomock.Call
- func (mr *MockApplicationMockRecorder) GetNumberOfUsers() *gomock.Call
- func (mr *MockApplicationMockRecorder) GetReceivedTransactions() *gomock.Call
- func (mr *MockApplicationMockRecorder) GetSentTransactions(user any) *gomock.Call
- func (mr *MockApplicationMockRecorder) Start(arg0 any) *gomock.Call
- func (mr *MockApplicationMockRecorder) Stop() *gomock.Call
- type MockNetwork
- func (m *MockNetwork) AdvanceEpoch(epochIncrement int) error
- func (m *MockNetwork) ApplyNetworkRules(rules NetworkRules) error
- func (m *MockNetwork) CreateApplication(arg0 context.Context, arg1 *ApplicationConfig) (Application, error)
- func (m *MockNetwork) CreateNode(config *NodeConfig) (Node, error)
- func (m *MockNetwork) DialRandomRpc() (rpc.Client, error)
- func (m *MockNetwork) EXPECT() *MockNetworkMockRecorder
- func (m *MockNetwork) GetActiveApplications() []Application
- func (m *MockNetwork) GetActiveNodes() []Node
- func (m *MockNetwork) RegisterListener(arg0 NetworkListener)
- func (m *MockNetwork) RemoveNode(arg0 Node) error
- func (m *MockNetwork) SendTransaction(tx *types.Transaction, source string)
- func (m *MockNetwork) Shutdown() error
- func (m *MockNetwork) UnregisterListener(arg0 NetworkListener)
- func (m *MockNetwork) WaitForEpochChange() error
- type MockNetworkListener
- type MockNetworkListenerMockRecorder
- type MockNetworkMockRecorder
- func (mr *MockNetworkMockRecorder) AdvanceEpoch(epochIncrement any) *gomock.Call
- func (mr *MockNetworkMockRecorder) ApplyNetworkRules(rules any) *gomock.Call
- func (mr *MockNetworkMockRecorder) CreateApplication(arg0, arg1 any) *gomock.Call
- func (mr *MockNetworkMockRecorder) CreateNode(config any) *gomock.Call
- func (mr *MockNetworkMockRecorder) DialRandomRpc() *gomock.Call
- func (mr *MockNetworkMockRecorder) GetActiveApplications() *gomock.Call
- func (mr *MockNetworkMockRecorder) GetActiveNodes() *gomock.Call
- func (mr *MockNetworkMockRecorder) RegisterListener(arg0 any) *gomock.Call
- func (mr *MockNetworkMockRecorder) RemoveNode(arg0 any) *gomock.Call
- func (mr *MockNetworkMockRecorder) SendTransaction(tx, source any) *gomock.Call
- func (mr *MockNetworkMockRecorder) Shutdown() *gomock.Call
- func (mr *MockNetworkMockRecorder) UnregisterListener(arg0 any) *gomock.Call
- func (mr *MockNetworkMockRecorder) WaitForEpochChange() *gomock.Call
- type MockNode
- func (m *MockNode) Cleanup(arg0 context.Context) error
- func (m *MockNode) DialRpc(arg0 context.Context) (rpc.Client, error)
- func (m *MockNode) EXPECT() *MockNodeMockRecorder
- func (m *MockNode) GetLabel() string
- func (m *MockNode) GetNodeID() (NodeID, error)
- func (m *MockNode) GetServiceUrl(arg0 *network.ServiceDescription) (*URL, error)
- func (m *MockNode) GetValidatorId() *int
- func (m *MockNode) Hostname() string
- func (m *MockNode) IsExpectedFailure() bool
- func (m *MockNode) IsRunning() bool
- func (m *MockNode) Kill(arg0 context.Context) error
- func (m *MockNode) MetricsPort() int
- func (m *MockNode) Stop(arg0 context.Context) error
- func (m *MockNode) StreamLog(arg0 context.Context) (io.ReadCloser, error)
- type MockNodeMockRecorder
- func (mr *MockNodeMockRecorder) Cleanup(arg0 any) *gomock.Call
- func (mr *MockNodeMockRecorder) DialRpc(arg0 any) *gomock.Call
- func (mr *MockNodeMockRecorder) GetLabel() *gomock.Call
- func (mr *MockNodeMockRecorder) GetNodeID() *gomock.Call
- func (mr *MockNodeMockRecorder) GetServiceUrl(arg0 any) *gomock.Call
- func (mr *MockNodeMockRecorder) GetValidatorId() *gomock.Call
- func (mr *MockNodeMockRecorder) Hostname() *gomock.Call
- func (mr *MockNodeMockRecorder) IsExpectedFailure() *gomock.Call
- func (mr *MockNodeMockRecorder) IsRunning() *gomock.Call
- func (mr *MockNodeMockRecorder) Kill(arg0 any) *gomock.Call
- func (mr *MockNodeMockRecorder) MetricsPort() *gomock.Call
- func (mr *MockNodeMockRecorder) Stop(arg0 any) *gomock.Call
- func (mr *MockNodeMockRecorder) StreamLog(arg0 any) *gomock.Call
- type Network
- type NetworkConfig
- type NetworkListener
- type NetworkRules
- type Node
- type NodeConfig
- type NodeID
- type URL
- type Validator
- type Validators
Constants ¶
const DefaultClientDockerImageName = "sonic"
DefaultClientDockerImageName is the name of the docker image to use for clients.
const ( // ErrEmptyNetwork is returned when trying to connect to an empty network. ErrEmptyNetwork = common.ConstError("network is empty") )
Variables ¶
This section is empty.
Functions ¶
func GetValidatorStakes ¶
func GetValidatorStakes(validators Validators) []uint64
GetValidatorStakes returns the list of validator stakes based on the provided configuration. If a validator has a stake of 0, it defaults to 5 million.
func ResolveClientImageName ¶
ResolveClientImageName returns imageName if set, otherwise the default client image name.
Types ¶
type Application ¶
type Application interface {
// Start begins producing load on the network as configured for this app.
Start(context.Context) error
// Stop terminates the load production.
Stop() error
// Config returns current application configuration.
Config() *ApplicationConfig
// GetNumberOfUsers retrieves the number of users interacting with this application.
// This value is expected to be a constant over the life-time of an application.
GetNumberOfUsers() int
// GetSentTransactions returns the number of transactions sent by a given user.
GetSentTransactions(user int) (uint64, error)
// GetReceivedTransactions returns the number fo transactions received by the appliation
// on the network.
GetReceivedTransactions() (uint64, error)
}
Application is an abstraction of an application running on a Norma net.
type ApplicationConfig ¶
type MockApplication ¶
type MockApplication struct {
// contains filtered or unexported fields
}
MockApplication is a mock of Application interface.
func NewMockApplication ¶
func NewMockApplication(ctrl *gomock.Controller) *MockApplication
NewMockApplication creates a new mock instance.
func (*MockApplication) Config ¶
func (m *MockApplication) Config() *ApplicationConfig
Config mocks base method.
func (*MockApplication) EXPECT ¶
func (m *MockApplication) EXPECT() *MockApplicationMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockApplication) GetNumberOfUsers ¶
func (m *MockApplication) GetNumberOfUsers() int
GetNumberOfUsers mocks base method.
func (*MockApplication) GetReceivedTransactions ¶
func (m *MockApplication) GetReceivedTransactions() (uint64, error)
GetReceivedTransactions mocks base method.
func (*MockApplication) GetSentTransactions ¶
func (m *MockApplication) GetSentTransactions(user int) (uint64, error)
GetSentTransactions mocks base method.
type MockApplicationMockRecorder ¶
type MockApplicationMockRecorder struct {
// contains filtered or unexported fields
}
MockApplicationMockRecorder is the mock recorder for MockApplication.
func (*MockApplicationMockRecorder) Config ¶
func (mr *MockApplicationMockRecorder) Config() *gomock.Call
Config indicates an expected call of Config.
func (*MockApplicationMockRecorder) GetNumberOfUsers ¶
func (mr *MockApplicationMockRecorder) GetNumberOfUsers() *gomock.Call
GetNumberOfUsers indicates an expected call of GetNumberOfUsers.
func (*MockApplicationMockRecorder) GetReceivedTransactions ¶
func (mr *MockApplicationMockRecorder) GetReceivedTransactions() *gomock.Call
GetReceivedTransactions indicates an expected call of GetReceivedTransactions.
func (*MockApplicationMockRecorder) GetSentTransactions ¶
func (mr *MockApplicationMockRecorder) GetSentTransactions(user any) *gomock.Call
GetSentTransactions indicates an expected call of GetSentTransactions.
func (*MockApplicationMockRecorder) Start ¶
func (mr *MockApplicationMockRecorder) Start(arg0 any) *gomock.Call
Start indicates an expected call of Start.
func (*MockApplicationMockRecorder) Stop ¶
func (mr *MockApplicationMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
type MockNetwork ¶
type MockNetwork struct {
// contains filtered or unexported fields
}
MockNetwork is a mock of Network interface.
func NewMockNetwork ¶
func NewMockNetwork(ctrl *gomock.Controller) *MockNetwork
NewMockNetwork creates a new mock instance.
func (*MockNetwork) AdvanceEpoch ¶
func (m *MockNetwork) AdvanceEpoch(epochIncrement int) error
AdvanceEpoch mocks base method.
func (*MockNetwork) ApplyNetworkRules ¶
func (m *MockNetwork) ApplyNetworkRules(rules NetworkRules) error
ApplyNetworkRules mocks base method.
func (*MockNetwork) CreateApplication ¶
func (m *MockNetwork) CreateApplication(arg0 context.Context, arg1 *ApplicationConfig) (Application, error)
CreateApplication mocks base method.
func (*MockNetwork) CreateNode ¶
func (m *MockNetwork) CreateNode(config *NodeConfig) (Node, error)
CreateNode mocks base method.
func (*MockNetwork) DialRandomRpc ¶
func (m *MockNetwork) DialRandomRpc() (rpc.Client, error)
DialRandomRpc mocks base method.
func (*MockNetwork) EXPECT ¶
func (m *MockNetwork) EXPECT() *MockNetworkMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockNetwork) GetActiveApplications ¶
func (m *MockNetwork) GetActiveApplications() []Application
GetActiveApplications mocks base method.
func (*MockNetwork) GetActiveNodes ¶
func (m *MockNetwork) GetActiveNodes() []Node
GetActiveNodes mocks base method.
func (*MockNetwork) RegisterListener ¶
func (m *MockNetwork) RegisterListener(arg0 NetworkListener)
RegisterListener mocks base method.
func (*MockNetwork) RemoveNode ¶
func (m *MockNetwork) RemoveNode(arg0 Node) error
RemoveNode mocks base method.
func (*MockNetwork) SendTransaction ¶
func (m *MockNetwork) SendTransaction(tx *types.Transaction, source string)
SendTransaction mocks base method.
func (*MockNetwork) UnregisterListener ¶
func (m *MockNetwork) UnregisterListener(arg0 NetworkListener)
UnregisterListener mocks base method.
func (*MockNetwork) WaitForEpochChange ¶
func (m *MockNetwork) WaitForEpochChange() error
WaitForEpochChange mocks base method.
type MockNetworkListener ¶
type MockNetworkListener struct {
// contains filtered or unexported fields
}
MockNetworkListener is a mock of NetworkListener interface.
func NewMockNetworkListener ¶
func NewMockNetworkListener(ctrl *gomock.Controller) *MockNetworkListener
NewMockNetworkListener creates a new mock instance.
func (*MockNetworkListener) AfterApplicationCreation ¶
func (m *MockNetworkListener) AfterApplicationCreation(arg0 Application)
AfterApplicationCreation mocks base method.
func (*MockNetworkListener) AfterNodeCreation ¶
func (m *MockNetworkListener) AfterNodeCreation(arg0 Node)
AfterNodeCreation mocks base method.
func (*MockNetworkListener) BeforeNodeRemoval ¶
func (m *MockNetworkListener) BeforeNodeRemoval(arg0 Node)
BeforeNodeRemoval mocks base method.
func (*MockNetworkListener) EXPECT ¶
func (m *MockNetworkListener) EXPECT() *MockNetworkListenerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockNetworkListenerMockRecorder ¶
type MockNetworkListenerMockRecorder struct {
// contains filtered or unexported fields
}
MockNetworkListenerMockRecorder is the mock recorder for MockNetworkListener.
func (*MockNetworkListenerMockRecorder) AfterApplicationCreation ¶
func (mr *MockNetworkListenerMockRecorder) AfterApplicationCreation(arg0 any) *gomock.Call
AfterApplicationCreation indicates an expected call of AfterApplicationCreation.
func (*MockNetworkListenerMockRecorder) AfterNodeCreation ¶
func (mr *MockNetworkListenerMockRecorder) AfterNodeCreation(arg0 any) *gomock.Call
AfterNodeCreation indicates an expected call of AfterNodeCreation.
func (*MockNetworkListenerMockRecorder) BeforeNodeRemoval ¶
func (mr *MockNetworkListenerMockRecorder) BeforeNodeRemoval(arg0 any) *gomock.Call
BeforeNodeRemoval indicates an expected call of BeforeNodeRemoval.
type MockNetworkMockRecorder ¶
type MockNetworkMockRecorder struct {
// contains filtered or unexported fields
}
MockNetworkMockRecorder is the mock recorder for MockNetwork.
func (*MockNetworkMockRecorder) AdvanceEpoch ¶
func (mr *MockNetworkMockRecorder) AdvanceEpoch(epochIncrement any) *gomock.Call
AdvanceEpoch indicates an expected call of AdvanceEpoch.
func (*MockNetworkMockRecorder) ApplyNetworkRules ¶
func (mr *MockNetworkMockRecorder) ApplyNetworkRules(rules any) *gomock.Call
ApplyNetworkRules indicates an expected call of ApplyNetworkRules.
func (*MockNetworkMockRecorder) CreateApplication ¶
func (mr *MockNetworkMockRecorder) CreateApplication(arg0, arg1 any) *gomock.Call
CreateApplication indicates an expected call of CreateApplication.
func (*MockNetworkMockRecorder) CreateNode ¶
func (mr *MockNetworkMockRecorder) CreateNode(config any) *gomock.Call
CreateNode indicates an expected call of CreateNode.
func (*MockNetworkMockRecorder) DialRandomRpc ¶
func (mr *MockNetworkMockRecorder) DialRandomRpc() *gomock.Call
DialRandomRpc indicates an expected call of DialRandomRpc.
func (*MockNetworkMockRecorder) GetActiveApplications ¶
func (mr *MockNetworkMockRecorder) GetActiveApplications() *gomock.Call
GetActiveApplications indicates an expected call of GetActiveApplications.
func (*MockNetworkMockRecorder) GetActiveNodes ¶
func (mr *MockNetworkMockRecorder) GetActiveNodes() *gomock.Call
GetActiveNodes indicates an expected call of GetActiveNodes.
func (*MockNetworkMockRecorder) RegisterListener ¶
func (mr *MockNetworkMockRecorder) RegisterListener(arg0 any) *gomock.Call
RegisterListener indicates an expected call of RegisterListener.
func (*MockNetworkMockRecorder) RemoveNode ¶
func (mr *MockNetworkMockRecorder) RemoveNode(arg0 any) *gomock.Call
RemoveNode indicates an expected call of RemoveNode.
func (*MockNetworkMockRecorder) SendTransaction ¶
func (mr *MockNetworkMockRecorder) SendTransaction(tx, source any) *gomock.Call
SendTransaction indicates an expected call of SendTransaction.
func (*MockNetworkMockRecorder) Shutdown ¶
func (mr *MockNetworkMockRecorder) Shutdown() *gomock.Call
Shutdown indicates an expected call of Shutdown.
func (*MockNetworkMockRecorder) UnregisterListener ¶
func (mr *MockNetworkMockRecorder) UnregisterListener(arg0 any) *gomock.Call
UnregisterListener indicates an expected call of UnregisterListener.
func (*MockNetworkMockRecorder) WaitForEpochChange ¶
func (mr *MockNetworkMockRecorder) WaitForEpochChange() *gomock.Call
WaitForEpochChange indicates an expected call of WaitForEpochChange.
type MockNode ¶
type MockNode struct {
// contains filtered or unexported fields
}
MockNode is a mock of Node interface.
func NewMockNode ¶
func NewMockNode(ctrl *gomock.Controller) *MockNode
NewMockNode creates a new mock instance.
func (*MockNode) EXPECT ¶
func (m *MockNode) EXPECT() *MockNodeMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockNode) GetServiceUrl ¶
func (m *MockNode) GetServiceUrl(arg0 *network.ServiceDescription) (*URL, error)
GetServiceUrl mocks base method.
func (*MockNode) GetValidatorId ¶
GetValidatorId mocks base method.
func (*MockNode) IsExpectedFailure ¶
IsExpectedFailure mocks base method.
type MockNodeMockRecorder ¶
type MockNodeMockRecorder struct {
// contains filtered or unexported fields
}
MockNodeMockRecorder is the mock recorder for MockNode.
func (*MockNodeMockRecorder) Cleanup ¶
func (mr *MockNodeMockRecorder) Cleanup(arg0 any) *gomock.Call
Cleanup indicates an expected call of Cleanup.
func (*MockNodeMockRecorder) DialRpc ¶
func (mr *MockNodeMockRecorder) DialRpc(arg0 any) *gomock.Call
DialRpc indicates an expected call of DialRpc.
func (*MockNodeMockRecorder) GetLabel ¶
func (mr *MockNodeMockRecorder) GetLabel() *gomock.Call
GetLabel indicates an expected call of GetLabel.
func (*MockNodeMockRecorder) GetNodeID ¶
func (mr *MockNodeMockRecorder) GetNodeID() *gomock.Call
GetNodeID indicates an expected call of GetNodeID.
func (*MockNodeMockRecorder) GetServiceUrl ¶
func (mr *MockNodeMockRecorder) GetServiceUrl(arg0 any) *gomock.Call
GetServiceUrl indicates an expected call of GetServiceUrl.
func (*MockNodeMockRecorder) GetValidatorId ¶
func (mr *MockNodeMockRecorder) GetValidatorId() *gomock.Call
GetValidatorId indicates an expected call of GetValidatorId.
func (*MockNodeMockRecorder) Hostname ¶
func (mr *MockNodeMockRecorder) Hostname() *gomock.Call
Hostname indicates an expected call of Hostname.
func (*MockNodeMockRecorder) IsExpectedFailure ¶
func (mr *MockNodeMockRecorder) IsExpectedFailure() *gomock.Call
IsExpectedFailure indicates an expected call of IsExpectedFailure.
func (*MockNodeMockRecorder) IsRunning ¶
func (mr *MockNodeMockRecorder) IsRunning() *gomock.Call
IsRunning indicates an expected call of IsRunning.
func (*MockNodeMockRecorder) Kill ¶
func (mr *MockNodeMockRecorder) Kill(arg0 any) *gomock.Call
Kill indicates an expected call of Kill.
func (*MockNodeMockRecorder) MetricsPort ¶
func (mr *MockNodeMockRecorder) MetricsPort() *gomock.Call
MetricsPort indicates an expected call of MetricsPort.
type Network ¶
type Network interface {
// CreateNode creates a new node instance running a network client based on
// the given configuration. It is used by the scenario executor to add
// nodes to the network as needed.
CreateNode(config *NodeConfig) (Node, error)
// RemoveNode ends the client gracefully and removes node from the network
RemoveNode(Node) error
// CreateApplication creates a new application in this network, ready to
// produce load as defined by its configuration.
CreateApplication(context.Context, *ApplicationConfig) (Application, error)
// GetActiveNodes obtains a list of active nodes in the network.
GetActiveNodes() []Node
// GetActiveApplications obtains a list of active apps in the network.
GetActiveApplications() []Application
// RegisterListener registers a listener to receive updates on network
// changes, for instance, to update monitoring information. Registering
// the same listener more than once will have no effect.
RegisterListener(NetworkListener)
// UnregisterListener removes the given listener from this network.
UnregisterListener(NetworkListener)
// Shutdown stops all applications and nodes in the network and frees
// any potential other resources.
Shutdown() error
// SendTransaction sends a transaction to the network.
// The source parameter is used for logging and debugging purposes.
SendTransaction(tx *types.Transaction, source string)
// Create a connection to a random node on the network. May fail if there
// is no node on the network with a ErrorEmptyNetwork error.
DialRandomRpc() (rpc.Client, error)
// ApplyNetworkRules applies the given network rules to the network.
ApplyNetworkRules(rules NetworkRules) error
// AdvanceEpoch advances an epoch by the given number.
AdvanceEpoch(epochIncrement int) error
// WaitForEpochChange waits until the epoch changes.
WaitForEpochChange() error
}
Network abstracts an execution environment for running scenarios. Implementations may run nodes and applications locally, in docker images, or remotely, on actual nodes. The interface is used by the scenario driver to execute scenario descriptions.
type NetworkConfig ¶
type NetworkConfig struct {
// Validators is a list of validators to start up in the network.
Validators Validators
// RoundTripTime is the average round trip time between nodes in the network.
RoundTripTime time.Duration
// NetworkRules is a map of network rules to be applied to the network.
NetworkRules NetworkRules
// OutputDir is the directory where temp data are written.
OutputDir string
}
NetworkConfig is a collection of network parameters to be used by factories creating network instances.
type NetworkListener ¶
type NetworkListener interface {
// AfterNodeCreation is called whenever a new node has joined the network.
AfterNodeCreation(Node)
// BeforeNodeRemoval is called whenever a node is removed from the network.
BeforeNodeRemoval(Node)
// AfterApplicationCreation is called after a new application has started.
AfterApplicationCreation(Application)
}
NetworkListener can be registered to networks to get callbacks whenever there are changes in the network.
type NetworkRules ¶
type NetworkRules = genesis.NetworkRulesPatch
NetworkRules defines a set of network rules that can be applied to the network. Network rules contains all the fields in sonic's opera.Rules, but all fields are optional and only the non-nil fields will be applied to the network.
This type is used to define the initial rule set in the genesis, by applying the diff to the default rules: opera.FakeNetRules(opera.GetSonicUpgrades()) Additionally it can be sent serialized using json to change the network rules during execution.
type Node ¶
type Node interface {
// GetLabel returns a human-readable identifier for this node. Is is intended
// to label data and should be unique within a single scenario run.
GetLabel() string
// IsExpectedFailure returns true if the node is supposed to fail during network execution.
IsExpectedFailure() bool
// Hostname returns the hostname of the host.
Hostname() string
// MetricsPort returns the port on which the node exposes its metrics.
MetricsPort() int
// IsRunning returns true if the node is still running, false if stopped.
IsRunning() bool
// GetNodeID returns an enode identifying this node within the Norma network.
// An error shall be produced if no valid node ID could be obtained.
GetNodeID() (NodeID, error)
// GetValidatorId returns the validator ID used by this node, if it is a
// validator node. If the node is not a validator, it returns nil.
GetValidatorId() *int
// GetServiceUrl returns the URL of a service running on the
// represented node. May be nil if no such service is offered.
GetServiceUrl(*network.ServiceDescription) (*URL, error)
// DialRpc establish an RPC connection with the node and returns the RPC client.
DialRpc(context.Context) (rpc.Client, error)
// StreamLog provides a reader that is continuously providing the host log.
// It is up to the caller to close the stream.
StreamLog(context.Context) (io.ReadCloser, error)
// Stop shuts down this node gracefully, using its regular shutdown
// procedure (not killed). After stopping the service, no more interactions
// are expected to succeed.
Stop(context.Context) error
// Kill shuts down this node disgracefully by using SigKill.
Kill(context.Context) error
// Cleanup releases all underlying resources. After the cleanup no more
// operations on this node are expected to succeed.
Cleanup(context.Context) error
}
Node is controlling a single node in a Norma network. It provides abstract control of a node, allowing it to be started (through an Environment), interact with the node, and shut it down.
type NodeConfig ¶
type NodeID ¶
type NodeID string
NodeID is a unique ID identifying each node. This identifier is used, for instance, to connect nodes within the network. In Opera, this ID is known as an 'enode' identifier.
type Validator ¶
type Validator struct {
Name string
Failing bool
Instances int
ImageName string
Stake uint64 // < Stake in FTM
ExtraArguments string // Extra command line arguments for sonicd
}
Validator is a configuration for a group of network start-up validators.
type Validators ¶
type Validators []Validator
func DefaultValidators ¶
func DefaultValidators(name string) Validators
DefaultValidators is a default configuration for a single validator.
func NewDefaultTestValidators ¶
func NewDefaultTestValidators(name string, instances int) Validators
func NewDefaultValidators ¶
func NewDefaultValidators(instances int) Validators
NewDefaultValidators creates a new Validators with a single validator defining only the number of instances, using the default client docker image.
func (Validators) GetNumValidators ¶
func (v Validators) GetNumValidators() int
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package checking is a generated GoMock package.
|
Package checking is a generated GoMock package. |
|
Package executor is a generated GoMock package.
|
Package executor is a generated GoMock package. |
|
globalflags is a package that provides global flags for the driver.
|
globalflags is a package that provides global flags for the driver. |
|
Package monitoring is a generated GoMock package.
|
Package monitoring is a generated GoMock package. |
|
Package network is a generated GoMock package.
|
Package network is a generated GoMock package. |
|
Package rpc is a generated GoMock package.
|
Package rpc is a generated GoMock package. |