/// NewDefaultRocR100 creates a Rate of Change Ratio 100 Scale Indicator (RocR100) for online usage with default parameters
//	- timePeriod: 10
345059
func NewDefaultRocR100() (indicator *RocR100, err error) {
	timePeriod := 10
	return NewRocR100(timePeriod, gotrade.UseClosePrice)
}
396701
func newDefaultConfig(url string, timeoutms int, config *RealisConfig) (*RealisConfig, error) {
	return newTJSONConfig(url, timeoutms, config)
}
403
func NewRocR100ForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR100, err error) {
	ind, err := NewRocR100WithSrcLen(sourceLength, timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
567225
func NewRocForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *Roc, err error) {
	ind, err := NewRoc(timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1157705
func NewDefaulter(id string, log bool) Defaulter {
	return &defaulter{
		id:  id,
		log: log,
	}
}
276250
func NewDefaultEma() (indicator *Ema, err error) {
	timePeriod := 25
	return NewEma(timePeriod, gotrade.UseClosePrice)
}
825985
func newRawDefaultConsumer(config *Config) (*rawDefaultConsumer, error) {
	c := &rawDefaultConsumer{
		dopplerAddr:    config.DopplerAddr,
		token:          config.Token,
		subscriptionID: config.SubscriptionID,
		insecure:       config.Insecure,
		debugPrinter:   config.DebugPrinter,
		logger:         config.Logger,
		idleTimeout:    config.IdleTimeout,
		retryCount:     config.RetryCount,
		tokenRefresher: config.tokenFetcher,
	}

	if err := c.validate(); err != nil {
		return nil, err
	}

	return c, nil

}
1190299
func NewDefaultAroonForStream(priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Aroon, err error) {
	ind, err := NewDefaultAroon()
	priceStream.AddTickSubscription(ind)
	return ind, err
}
643222
func NewDefaultTema() (indicator *Tema, err error) {
	timePeriod := 30
	return NewTema(timePeriod, gotrade.UseClosePrice)
}
599507
func NewDefaultAtrForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber) (indicator *Atr, err error) {
	ind, err := NewDefaultAtrWithSrcLen(sourceLength)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
425263
func (m *Manifest) NewAdapterOrDefault(name string, dir Direction) Adapter {
	if len(name) == 0 {
		name = BasicAdapterName
	}

	a := m.NewAdapter(name, dir)
	if a == nil {
		tracerx.Printf("Defaulting to basic transfer adapter since %q did not exist", name)
		a = m.NewAdapter(BasicAdapterName, dir)
	}
	return a
}
11826
func NewDefaultRoleBindingsController(roleBindingInformer rbacinformers.RoleBindingInformer, namespaceInformer coreinformers.NamespaceInformer, roleBindingClient rbacclient.RoleBindingsGetter) *DefaultRoleBindingController {
	c := &DefaultRoleBindingController{
		roleBindingClient: roleBindingClient,

		roleBindingLister: roleBindingInformer.Lister(),
		roleBindingSynced: roleBindingInformer.Informer().HasSynced,
		namespaceLister:   namespaceInformer.Lister(),
		namespaceSynced:   namespaceInformer.Informer().HasSynced,

		queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "DefaultRoleBindingsController"),
	}
	c.syncHandler = c.syncNamespace

	roleBindingInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
		FilterFunc: func(obj interface{}) bool {
			metadata, err := meta.Accessor(obj)
			if err != nil {
				return false
			}
			return defaultRoleBindingNames.Has(metadata.GetName())
		},
		Handler: cache.ResourceEventHandlerFuncs{
			DeleteFunc: func(uncast interface{}) {
				metadata, err := meta.Accessor(uncast)
				if err == nil {
					c.queue.Add(metadata.GetNamespace())
					return
				}

				tombstone, ok := uncast.(cache.DeletedFinalStateUnknown)
				if !ok {
					utilruntime.HandleError(fmt.Errorf("couldn't get object from tombstone %#v", uncast))
					return
				}
				metadata, err = meta.Accessor(tombstone.Obj)
				if err != nil {
					utilruntime.HandleError(err)
					return
				}
				c.queue.Add(metadata.GetNamespace())
			},
		},
	})
	namespaceInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
		AddFunc: func(obj interface{}) {
			metadata, err := meta.Accessor(obj)
			if err != nil {
				utilruntime.HandleError(err)
				return
			}
			c.queue.Add(metadata.GetName())
		},
	})
	return c
}
712124
func NewRocR100ForStream(priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR100, err error) {
	ind, err := NewRocR100(timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
1263374
func (m *CRConverterFactory) NewConverter(crd *apiextensions.CustomResourceDefinition) (safe, unsafe runtime.ObjectConvertor, err error) {
	validVersions := map[schema.GroupVersion]bool{}
	for _, version := range crd.Spec.Versions {
		validVersions[schema.GroupVersion{Group: crd.Spec.Group, Version: version.Name}] = true
	}

	var converter crConverterInterface
	switch crd.Spec.Conversion.Strategy {
	case apiextensions.NoneConverter:
		converter = &nopConverter{}
	case apiextensions.WebhookConverter:
		if !utilfeature.DefaultFeatureGate.Enabled(apiextensionsfeatures.CustomResourceWebhookConversion) {
			return nil, nil, fmt.Errorf("webhook conversion is disabled on this cluster")
		}
		converter, err = m.webhookConverterFactory.NewWebhookConverter(crd)
		if err != nil {
			return nil, nil, err
		}
		converter, err = m.converterMetricFactory.addMetrics("webhook", crd.Name, converter)
		if err != nil {
			return nil, nil, err
		}
	default:
		return nil, nil, fmt.Errorf("unknown conversion strategy %q for CRD %s", crd.Spec.Conversion.Strategy, crd.Name)
	}

	// Determine whether we should expect to be asked to "convert" autoscaling/v1 Scale types
	convertScale := false
	if utilfeature.DefaultFeatureGate.Enabled(apiextensionsfeatures.CustomResourceSubresources) {
		convertScale = crd.Spec.Subresources != nil && crd.Spec.Subresources.Scale != nil
		for _, version := range crd.Spec.Versions {
			if version.Subresources != nil && version.Subresources.Scale != nil {
				convertScale = true
			}
		}
	}

	unsafe = &crConverter{
		convertScale:  convertScale,
		validVersions: validVersions,
		clusterScoped: crd.Spec.Scope == apiextensions.ClusterScoped,
		converter:     converter,
	}
	return &safeConverterWrapper{unsafe}, unsafe, nil
}
1358448
func NewDefaultRocP() (indicator *RocP, err error) {
	timePeriod := 10
	return NewRocP(timePeriod, gotrade.UseClosePrice)
}
950677
func NewDefaultVar() (indicator *Var, err error) {
	timePeriod := 10
	return NewVar(timePeriod, gotrade.UseClosePrice)
}
943275
func NewRocRWithSrcLen(sourceLength uint, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *RocR, err error) {
	ind, err := NewRocR(timePeriod, selectData)

	// only initialise the storage if there is enough source data to require it
	if sourceLength-uint(ind.GetLookbackPeriod()) > 1 {
		ind.Data = make([]float64, 0, sourceLength-uint(ind.GetLookbackPeriod()))
	}

	return ind, err
}