MCPcopy
hub / github.com/weaviate/weaviate / validateStorageConfig

Method validateStorageConfig

usecases/export/scheduler.go:946–953  ·  view source on GitHub ↗

validateStorageConfig returns the configured bucket and path. It is shared by Export, Status and Cancel because all three need to address the same storage location. The bucket is required for bucket-backed backends. The path defaults to empty if not configured; each backend module provides a dedicat

(backend string)

Source from the content-addressed store, hash-verified

944// The path defaults to empty if not configured; each backend module provides
945// a dedicated export client that does not fall back to the backup path.
946func (s *Scheduler) validateStorageConfig(backend string) (bucket, path string, err error) {
947 bucket = s.exportConfig.DefaultBucket.Get()
948 path = s.exportConfig.DefaultPath.Get()
949 if bucket == "" && requiresBucket(backend) {
950 return "", "", fmt.Errorf("%w: EXPORT_DEFAULT_BUCKET is required for backend %q", ErrExportValidation, backend)
951 }
952 return bucket, path, nil
953}
954
955// resolveClasses determines which classes to export.
956// It silently ignores non-existent classes in include/exclude lists to avoid

Callers 3

ExportMethod · 0.95
StatusMethod · 0.95
CancelMethod · 0.95

Calls 3

requiresBucketFunction · 0.85
ErrorfMethod · 0.80
GetMethod · 0.65

Tested by

no test coverage detected