SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
package tasks
import (
"sync"
"github.com/seaweedfs/seaweedfs/weed/admin/config"
)
// TaskConfigSchema defines the schema for task configuration
type TaskConfigSchema struct {
config.Schema // Embed common schema functionality
TaskName string `json:"task_name"`
DisplayName string `json:"display_name"`
Description string `json:"description"`
Icon string `json:"icon"`
}
// TaskConfigSchemaProvider is an interface for providing task configuration schemas
type TaskConfigSchemaProvider interface {
GetConfigSchema() *TaskConfigSchema
}
// schemaRegistry maintains a registry of schema providers by task type
type schemaRegistry struct {
providers map[string]TaskConfigSchemaProvider
mutex sync.RWMutex
}
var globalSchemaRegistry = &schemaRegistry{
providers: make(map[string]TaskConfigSchemaProvider),
}
// RegisterTaskConfigSchema registers a schema provider for a task type
func RegisterTaskConfigSchema(taskType string, provider TaskConfigSchemaProvider) {
globalSchemaRegistry.mutex.Lock()
defer globalSchemaRegistry.mutex.Unlock()
globalSchemaRegistry.providers[taskType] = provider
}