MCPcopy Create free account
hub / github.com/brimdata/super / CreateOrOpen

Function CreateOrOpen

db/root.go:96–102  ·  view source on GitHub ↗
(ctx context.Context, engine storage.Engine, logger *zap.Logger, path *storage.URI)

Source from the content-addressed store, hash-verified

94}
95
96func CreateOrOpen(ctx context.Context, engine storage.Engine, logger *zap.Logger, path *storage.URI) (*Root, error) {
97 r, err := Open(ctx, engine, logger, path)
98 if errors.Is(err, ErrNotExist) {
99 return Create(ctx, engine, logger, path)
100 }
101 return r, err
102}
103
104func (r *Root) createConfig(ctx context.Context) error {
105 poolPath := r.path.JoinPath(PoolsTag)

Callers 1

NewCoreFunction · 0.92

Calls 3

IsMethod · 0.80
OpenFunction · 0.70
CreateFunction · 0.70

Tested by

no test coverage detected