Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrAlreadyPushed indicates a dataset has already been published // TODO (b5) - move this into lib/remote ErrAlreadyPushed = fmt.Errorf("this dataset has already been published") // StatePushAttempted is the state to sync on once a pusher has tried to // push its dataset to all remotes, regardless of if the attempt was // successful StatePushAttempted = sync.State("push to all remotes attempted") // StatePullAttempted is the state to sync on once a puller has tried // pull a dataset from each remote, regardless of if the attempt was // successful StatePullAttempted = sync.State("pull from all remotes attempted") // StateConnectionAttempted is the state to sync on once an instance has attempted // to connect to each other instance StateConnectionAttempted = sync.State("connection to all other nodes attempted") )
var ( // StateActorConstructed is the state to sync on to check if all the // actors in the test have been constructed StateActorConstructed = sync.State("actor has been constructed") )
Functions ¶
This section is empty.
Types ¶
type Actor ¶
Actor is a peer in a network simulation
func NewActor ¶
func NewActor(ctx context.Context, runenv *runtime.RunEnv, client sync.Client, seq int64, opts ...lib.Option) (*Actor, error)
NewActor creates an actor instance
func (*Actor) GenerateDatasetVersion ¶
GenerateDatasetVersion creates & Saves a new version of a dataset Datasets are generic CSV datasets with only the number of rows configurable We're trying to test the network here. Size should be the only real concern
func (*Actor) ID ¶
ID provides a string identifier for this peer TODO (b5) - this should be a logbook identifier
type ActorInfo ¶
type ActorInfo struct { Seq int // sequence number within the test Peername string ProfileID string AddrInfo *peer.AddrInfo }
ActorInfo carries details about an actor
type RemoteHooks ¶
type RemoteHooks struct {
// contains filtered or unexported fields
}
RemoteHooks implements remote behaviour for cloud backend to store and pin datasets. Remote invokes cloud infrastructure on successful push
func (*RemoteHooks) RemoteOptionsFunc ¶
func (r *RemoteHooks) RemoteOptionsFunc() lib.Option
RemoteOptionsFunc creates a function to connect hooks to a remote at initialization