Documentation ¶
Index ¶
- Constants
- Variables
- type ActorConstructor
- type Plan
- func (plan *Plan) ActorFinished(ctx context.Context) error
- func (plan *Plan) Close()
- func (plan *Plan) ConstructActor(ctx context.Context, constructor ActorConstructor) error
- func (plan *Plan) DialOtherPeers(ctx context.Context) ([]peer.AddrInfo, error)
- func (plan *Plan) Finished(ctx context.Context) <-chan error
- func (plan *Plan) SetupNetwork(ctx context.Context) error
- func (plan *Plan) ShareInfo(ctx context.Context) error
- type PlanConfig
Constants ¶
const FinishedState = sync.State("finished")
FinishedState coordinates plan completion
Variables ¶
var ActorInfoTopic = sync.NewTopic("actor-info", &sim.ActorInfo{})
ActorInfoTopic represents a subtree under the test run's sync tree where peers participating in this distributed test advertise their attributes
var ReadyStateActorInfoSync = sync.State("actor info published")
var ReadyStateConstructed = sync.State("actor constructed")
ReadyStateConstructed is the state to sync on to ensure all actors have been constructed before moving on
Functions ¶
This section is empty.
Types ¶
type ActorConstructor ¶
ActorConstructor is a function that creates an actor
type Plan ¶
type Plan struct { Cfg *PlanConfig Runenv *runtime.RunEnv Client sync.Client Seq int64 Actor *sim.Actor Others map[string]*sim.ActorInfo // contains filtered or unexported fields }
Plan holds state for test plan execution, one plan instance is constructed per node in the plan, with methods for syncronizing plan instances out-of-band from the test itself
func (*Plan) ActorFinished ¶
ActorFinished marks this actor as having completed their goal for the plan
func (*Plan) ConstructActor ¶
func (plan *Plan) ConstructActor(ctx context.Context, constructor ActorConstructor) error
ConstructActor creates an actor and assigns it to the plan it's mainly sugar for presnting a uniform plan execution API
func (*Plan) DialOtherPeers ¶
DialOtherPeers dials a portion of peers
func (*Plan) SetupNetwork ¶
SetupNetwork configures the network for plan execution
type PlanConfig ¶
PlanConfig encapsulates test plan paremeters
func PlanConfigFromRuntimeEnv ¶
func PlanConfigFromRuntimeEnv(runenv *runtime.RunEnv) *PlanConfig
PlanConfigFromRuntimeEnv parses configuration from the runtime environment