github.com/asynkron/protoactor-go@v0.0.0-20240308120642-ef91a6abee75/cluster/cluster_test_tool/in_memory_cluster_fixture.go (about) 1 package cluster_test_tool 2 3 import ( 4 "github.com/asynkron/protoactor-go/cluster" 5 "github.com/asynkron/protoactor-go/cluster/clusterproviders/test" 6 ) 7 8 // NewBaseInMemoryClusterFixture creates a new in memory cluster fixture 9 func NewBaseInMemoryClusterFixture(clusterSize int, opts ...ClusterFixtureOption) *BaseClusterFixture { 10 inMemAgent := test.NewInMemAgent() 11 baseInMemoryOpts := []ClusterFixtureOption{ 12 WithGetClusterProvider(func() cluster.ClusterProvider { 13 return test.NewTestProvider(inMemAgent) 14 }), 15 } 16 baseInMemoryOpts = append(baseInMemoryOpts, opts...) 17 18 return NewBaseClusterFixture(clusterSize, baseInMemoryOpts...) 19 }