Files
EdgeCommon/pkg/serverconfigs/scheduling_config.go

23 lines
537 B
Go
Raw Permalink Normal View History

2020-09-13 19:27:47 +08:00
package serverconfigs
import "github.com/iwind/TeaGo/maps"
// SchedulingConfig 调度算法配置
2020-09-13 19:27:47 +08:00
type SchedulingConfig struct {
Code string `yaml:"code" json:"code"` // 类型
Options maps.Map `yaml:"options" json:"options"` // 选项
}
// NewSchedulingConfig 获取新对象
2020-09-13 19:27:47 +08:00
func NewSchedulingConfig() *SchedulingConfig {
return &SchedulingConfig{}
}
// Clone 克隆
func (this *SchedulingConfig) Clone() *SchedulingConfig {
return &SchedulingConfig{
Code: this.Code,
Options: maps.NewMap(this.Options),
}
}