github.com/prysmaticlabs/prysm@v1.4.4/endtoend/types/types.go (about) 1 // Package types includes important structs used by end to end tests, such 2 // as a configuration type, an evaluator type, and more. 3 package types 4 5 import ( 6 "context" 7 8 types "github.com/prysmaticlabs/eth2-types" 9 "google.golang.org/grpc" 10 ) 11 12 // E2EConfig defines the struct for all configurations needed for E2E testing. 13 type E2EConfig struct { 14 BeaconFlags []string 15 ValidatorFlags []string 16 EpochsToRun uint64 17 TestSync bool 18 TestSlasher bool 19 TestDeposits bool 20 UsePprof bool 21 UsePrysmShValidator bool 22 Evaluators []Evaluator 23 } 24 25 // Evaluator defines the structure of the evaluators used to 26 // conduct the current beacon state during the E2E. 27 type Evaluator struct { 28 Name string 29 Policy func(currentEpoch types.Epoch) bool 30 Evaluation func(conn ...*grpc.ClientConn) error // A variable amount of conns is allowed to be passed in for evaluations to check all nodes if needed. 31 } 32 33 // ComponentRunner defines an interface via which E2E component's configuration, execution and termination is managed. 34 type ComponentRunner interface { 35 // Start starts a component. 36 Start(ctx context.Context) error 37 // Started checks whether an underlying component is started and ready to be queried. 38 Started() <-chan struct{} 39 }