github.com/asynkron/protoactor-go@v0.0.0-20240308120642-ef91a6abee75/persistence/protocb/config.go (about) 1 package protocb 2 3 type couchbaseConfig struct { 4 async bool 5 snapshotInterval int 6 } 7 8 type CouchbaseOption func(*couchbaseConfig) 9 10 func WithAsync() CouchbaseOption { 11 return func(config *couchbaseConfig) { 12 config.async = true 13 } 14 } 15 16 func WithSnapshot(interval int) CouchbaseOption { 17 return func(config *couchbaseConfig) { 18 config.snapshotInterval = interval 19 } 20 }