Documentation ¶
Index ¶
- func CheckResult(t *testing.T, result *simulations.StepResult, startedAt, finishedAt time.Time)
- func NewAdapter(adapterType string, services adapters.Services) (adapter adapters.NodeAdapter, teardown func(), err error)
- func SetStores(addrs ...network.Addr) ([]storage.ChunkStore, func(), error)
- func Trigger(d time.Duration, quitC chan struct{}, ids ...discover.NodeID) chan discover.NodeID
- func WatchDisconnections(id discover.NodeID, client *rpc.Client, errc chan error, quitC chan struct{}) (doneC <-chan struct{}, err error)
- type RunConfig
- type Simulation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckResult ¶
func CheckResult(t *testing.T, result *simulations.StepResult, startedAt, finishedAt time.Time)
func NewAdapter ¶
func WatchDisconnections ¶
func WatchDisconnections(id discover.NodeID, client *rpc.Client, errc chan error, quitC chan struct{}) (doneC <-chan struct{}, err error)
WatchDisconnections subscribes to admin peerEvents and sends peer event drop errors to the errc channel. Channel quitC signals the termination of the event loop. Returned doneC will be closed after the rpc subscription is unsubscribed, signaling that simulations network is safe to shutdown.
Types ¶
type Simulation ¶
type Simulation struct { Net *simulations.Network Stores []storage.ChunkStore Addrs []network.Addr IDs []discover.NodeID }
func NewSimulation ¶
func NewSimulation(conf *RunConfig) (*Simulation, func(), error)
func (*Simulation) CallClient ¶
func (*Simulation) Run ¶
func (s *Simulation) Run(ctx context.Context, conf *RunConfig) (*simulations.StepResult, error)
Click to show internal directories.
Click to hide internal directories.