// NewCollectClassNamesArgs initializes CollectClassNamesArgs with the required arguments.
778662
func NewCollectClassNamesArgs(styleSheetID StyleSheetID) *CollectClassNamesArgs {
	args := new(CollectClassNamesArgs)
	args.StyleSheetID = styleSheetID
	return args
}
269325
func NewCollectorGrpcClient(address string, timeout time.Duration, security GRPCSecurity) (PluginCollectorClient, error) {
	ctx := context.Background()
	p, err := newPluginGrpcClient(ctx, address, timeout, security, plugin.CollectorPluginType)
	if err != nil {
		return nil, err
	}
	return p.(PluginCollectorClient), err
}
332543
func NewSetDiscoverTargetsArgs(discover bool) *SetDiscoverTargetsArgs {
	args := new(SetDiscoverTargetsArgs)
	args.Discover = discover
	return args
}
194750
func NewRequestDatabaseNamesArgs(securityOrigin string) *RequestDatabaseNamesArgs {
	args := new(RequestDatabaseNamesArgs)
	args.SecurityOrigin = securityOrigin
	return args
}
754517
func CollectionFromName(db *mgo.Database, coll string) (Collection, func()) {
	session := db.Session.Copy()
	newColl := db.C(coll).With(session)
	return WrapCollection(newColl), session.Close
}
77153
func NewXFSCollector() (Collector, error) {
	fs, err := sysfs.NewFS(*sysPath)
	if err != nil {
		return nil, fmt.Errorf("failed to open sysfs: %v", err)
	}

	return &xfsCollector{
		fs: fs,
	}, nil
}
99492
func (c *FakeStorageClasses) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
	action := testing.NewRootDeleteCollectionAction(storageclassesResource, listOptions)

	_, err := c.Fake.Invokes(action, &v1beta1.StorageClassList{})
	return err
}
164945
func PrometheusCollectors() []prometheus.Collector {
	mmu.RLock()
	defer mmu.RUnlock()

	var collectors []prometheus.Collector
	if cms != nil {
		collectors = append(collectors, cms.PrometheusCollectors()...)
	}
	if pms != nil {
		collectors = append(collectors, pms.PrometheusCollectors()...)
	}
	return collectors
}
429876
func NewCollectionShareDetails(AlbumName string) *CollectionShareDetails {
	s := new(CollectionShareDetails)
	s.AlbumName = AlbumName
	return s
}
105288
func NewNFSdCollector() (Collector, error) {
	fs, err := procfs.NewFS(*procPath)
	if err != nil {
		return nil, fmt.Errorf("failed to open procfs: %v", err)
	}

	return &nfsdCollector{
		fs: fs,
		requestsDesc: prometheus.NewDesc(
			prometheus.BuildFQName(namespace, nfsdSubsystem, "requests_total"),
			"Total number NFSd Requests by method and protocol.",
			[]string{"proto", "method"}, nil,
		),
	}, nil
}
1051765
func NewFolderStatisticsNamespace(db *Lowlevel, folder string) *NamespacedKV {
	return NewNamespacedKV(db, string(KeyTypeFolderStatistic)+folder)
}
947238
func NewNetDevCollector() (Collector, error) {
	pattern := regexp.MustCompile(*netdevIgnoredDevices)
	return &netDevCollector{
		subsystem:             "network",
		ignoredDevicesPattern: pattern,
		metricDescs:           map[string]*prometheus.Desc{},
	}, nil
}
1333227
func NewClassImplements(interfaceNames []node.Node) *ClassImplements {
	return &ClassImplements{
		FreeFloating:   nil,
		InterfaceNames: interfaceNames,
	}
}
1062378
func newCollector(ns *metrics.Namespace) *collector {
	if ns == nil {
		return &collector{}
	}
	// add machine cpus and memory info
	c := &collector{
		ns:    ns,
		tasks: make(map[string]runtime.Task),
	}
	c.metrics = append(c.metrics, pidMetrics...)
	c.metrics = append(c.metrics, cpuMetrics...)
	c.metrics = append(c.metrics, memoryMetrics...)
	c.metrics = append(c.metrics, hugetlbMetrics...)
	c.metrics = append(c.metrics, blkioMetrics...)
	c.storedMetrics = make(chan prometheus.Metric, 100*len(c.metrics))
	ns.Add(c)
	return c
}
735780
func (sfx *SignalFxSink) newPointCollection() *collection {
	return &collection{
		sink:        sfx,
		points:      []*datapoint.Datapoint{},
		pointsByKey: map[string][]*datapoint.Datapoint{},
	}
}
288939
func (m *metricCollectorRegistry) InitializeMetricCollectors(name string) []MetricCollector {
	m.lock.RLock()
	defer m.lock.RUnlock()

	metrics := make([]MetricCollector, len(m.registry))
	for i, metricCollectorInitializer := range m.registry {
		metrics[i] = metricCollectorInitializer(name)
	}
	return metrics
}
1346989
func NewCollector(options ...func(*Collector)) *Collector {
	c := &Collector{}
	c.Init()

	for _, f := range options {
		f(c)
	}

	c.parseSettingsFromEnv()

	return c
}