Documentation
¶
Index ¶
- Variables
- func ConstructWireFrame(magic protocol.Magic, cmd topics.Topic, payload *bytes.Buffer) ([]byte, error)
- func Profile1(index int, node *DuskNode, walletPath string)
- func Profile2(index int, node *DuskNode, walletPath string)
- func WriteFrame(buf *bytes.Buffer) (*bytes.Buffer, error)
- type DuskNode
- type Network
- func (n *Network) Bootstrap(workspace string) error
- func (n *Network) PublishTopic(nodeIndex uint, topic, payload string) error
- func (n *Network) SendCommand(nodeIndex uint, method string, params []string) (string, error)
- func (n *Network) SendQuery(nodeIndex uint, query string, result interface{}) error
- func (n *Network) SendWireMsg(nodeIndex uint, msg []byte, writeTimeout int) error
- func (n *Network) Teardown()
- type Profiles
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // EnableHarness a test CLI param to enable harness bootstrapping EnableHarness = flag.Bool("enable", false, "Enable Test Harness bootstrapping") // RPCNetworkType a test CLI param to set jsonrpc network type (unix or tcp) RPCNetworkType = flag.String("rpc_transport", "unix", "JSON-RPC transport type (unix/tcp)") // KeepAlive a test CLI param to keep harness running even after all tests have passed // It's useful when additional manual tests should be done KeepAlive = flag.Bool("keepalive", false, "Keep Test Harness alive after tests pass") // Errors // ErrDisabledHarness ErrDisabledHarness = errors.New("disabled test harness") )
Functions ¶
func ConstructWireFrame ¶
Types ¶
type DuskNode ¶
type DuskNode struct {
Id string
ConfigProfileID string
// fields represents a dusk-blockchain instance
Cfg config.Registry
Gql *graphql.Client
// dusk-blockchain node directory
Dir string
}
func NewDuskNode ¶
type Network ¶
type Network struct {
Nodes []*DuskNode
// contains filtered or unexported fields
}
func (*Network) Bootstrap ¶
Bootstrap performs all actions needed to initialize and start a local network This network is alive by the end of all tests execution
func (*Network) PublishTopic ¶
PublishTopic publishes an event bus topic to the specified node via rpc call
func (*Network) SendCommand ¶
SendCommand sends a jsonrpc request to the specified network node. Returns a string with the response of the json-rpc server.
func (*Network) SendWireMsg ¶
SendWireMsg sends a P2P message to the specified network node NB: Handshaking procedure must be performed prior to the message sending
Click to show internal directories.
Click to hide internal directories.