MCPcopy Create free account
hub / github.com/clouditor/clouditor / WithInMemory

Function WithInMemory

persistence/gorm/gorm.go:87–91  ·  view source on GitHub ↗

WithInMemory is an option to configure Storage to use an in memory DB

()

Source from the content-addressed store, hash-verified

85
86// WithInMemory is an option to configure Storage to use an in memory DB
87func WithInMemory() StorageOption {
88 return func(s *storage) {
89 s.dialector = sqlite.Open(":memory:?_pragma=foreign_keys(1)")
90 }
91}
92
93// WithMaxOpenConns is an option to configure the maximum number of open connections
94func WithMaxOpenConns(max int) StorageOption {

Callers 4

TestNewServiceFunction · 0.92
NewStorageFunction · 0.92
NewStorageFunction · 0.85
TestStorageOptionsFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestNewServiceFunction · 0.74
TestStorageOptionsFunction · 0.68