You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							25 lines
						
					
					
						
							747 B
						
					
					
				
			
		
		
		
			
			
			
		
		
	
	
							25 lines
						
					
					
						
							747 B
						
					
					
				| package handlers | |
| 
 | |
| import ( | |
| 	"github.com/seaweedfs/seaweedfs/weed/admin/config" | |
| 	"github.com/seaweedfs/seaweedfs/weed/pb/worker_pb" | |
| ) | |
| 
 | |
| // TaskConfig defines the interface that all task configuration types must implement | |
| type TaskConfig interface { | |
| 	config.ConfigWithDefaults // Extends ConfigWithDefaults for type-safe schema operations | |
|  | |
| 	// Common methods from BaseConfig | |
| 	IsEnabled() bool | |
| 	SetEnabled(enabled bool) | |
| 
 | |
| 	// Protobuf serialization methods - no more map[string]interface{}! | |
| 	ToTaskPolicy() *worker_pb.TaskPolicy | |
| 	FromTaskPolicy(policy *worker_pb.TaskPolicy) error | |
| } | |
| 
 | |
| // TaskConfigProvider defines the interface for creating specific task config types | |
| type TaskConfigProvider interface { | |
| 	NewConfig() TaskConfig | |
| 	GetTaskType() string | |
| }
 |