| 72 | } |
| 73 | |
| 74 | func NewOptions() *ControllerOptions { |
| 75 | return &ControllerOptions{ |
| 76 | RecommendedOptions: genericoptions.NewRecommendedOptions(), |
| 77 | FuncletClientOptions: client.NewFuncletClientOptions(), |
| 78 | DispatcherV2Options: rtctrl.NewDispatcherV2Options(), |
| 79 | RepositoryOptions: registry.NewOption(), |
| 80 | HttpTriggerRepositoryOptions: registry.NewEmptyOption(), |
| 81 | RuntimeConfigOptions: rtctrl.NewRuntimeConfigOptions(), |
| 82 | AliasCacheOptions: function.NewStorageCacheOptions(), |
| 83 | TaskInterval: 5, |
| 84 | MetricsTaskInterval: 10, |
| 85 | MaxRuntimeIdle: 60, |
| 86 | MaxRunnerDefunct: 90, |
| 87 | MaxRunnerResetTimeout: 60, |
| 88 | ConcurrentMode: true, |
| 89 | GoMaxProcs: runtime.NumCPU(), |
| 90 | HTTPEnhanced: false, |
| 91 | EnableCanary: false, |
| 92 | SimpleAuth: true, |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | func (s *ControllerOptions) AddFlags(fs *pflag.FlagSet) { |
| 97 | s.RecommendedOptions.AddFlags(fs) |