// New initializes a new plugin and returns it.
433954
func New(config *runtime.Unknown, _ framework.FrameworkHandle) (framework.Plugin, error) {
	if config == nil {
		klog.Error("MultipointExample configuration cannot be empty")
		return nil, fmt.Errorf("MultipointExample configuration cannot be empty")
	}
	mp := MultipointExample{
		mpState: make(map[int]string),
	}
	return &mp, nil
}
468153
func (t *TimeSeries) New(chronograf.Source, chronograf.Logger) (chronograf.TimeSeries, error) {
	return t, nil
}
99835
func new_(e interface{}) func() Event {
	typ := reflect.TypeOf(e)
	return func() Event {
		return reflect.New(typ).Interface().(Event)
	}
}
1106419
func New(displayNameLen, roleNameLen, usernameLen int) func() (interface{}, error) {
	return func() (interface{}, error) {
		db := new(displayNameLen, roleNameLen, usernameLen)
		// Wrap the plugin with middleware to sanitize errors
		dbType := dbplugin.NewDatabaseErrorSanitizerMiddleware(db, db.SecretValues)

		return dbType, nil
	}
}
675353
func (d DefaultJSONLoaderFactory) New(source string) JSONLoader {
	return &jsonReferenceLoader{
		fs:     osFS,
		source: source,
	}
}
460796
func (c *Config) New(proxyTransport *http.Transport, serviceResolver webhook.ServiceResolver) ([]admission.PluginInitializer, server.PostStartHookFunc, error) {
	webhookAuthResolverWrapper := webhook.NewDefaultAuthenticationInfoResolverWrapper(proxyTransport, c.LoopbackClientConfig)
	webhookPluginInitializer := webhookinit.NewPluginInitializer(webhookAuthResolverWrapper, serviceResolver)

	var cloudConfig []byte
	if c.CloudConfigFile != "" {
		var err error
		cloudConfig, err = ioutil.ReadFile(c.CloudConfigFile)
		if err != nil {
			klog.Fatalf("Error reading from cloud configuration file %s: %#v", c.CloudConfigFile, err)
		}
	}
	clientset, err := kubernetes.NewForConfig(c.LoopbackClientConfig)
	if err != nil {
		return nil, nil, err
	}

	discoveryClient := cacheddiscovery.NewMemCacheClient(clientset.Discovery())
	discoveryRESTMapper := restmapper.NewDeferredDiscoveryRESTMapper(discoveryClient)
	kubePluginInitializer := NewPluginInitializer(
		cloudConfig,
		discoveryRESTMapper,
		quotainstall.NewQuotaConfigurationForAdmission(),
	)

	admissionPostStartHook := func(context genericapiserver.PostStartHookContext) error {
		discoveryRESTMapper.Reset()
		go utilwait.Until(discoveryRESTMapper.Reset, 30*time.Second, context.StopCh)
		return nil
	}

	return []admission.PluginInitializer{webhookPluginInitializer, kubePluginInitializer}, admissionPostStartHook, nil
}
763518
func New(c Config) (*Globber, error) {
	hasmeta, err := c.metaRegexp()
	if err != nil {
		return nil, err
	}
	return &Globber{c, hasmeta}, nil
}
1141214
func New(
	extClientset kubernetes.Interface,
	extInformers informers.SharedInformerFactory,
	authz authorizer.Authorizer,
) pluginInitializer {
	return pluginInitializer{
		externalClient:    extClientset,
		externalInformers: extInformers,
		authorizer:        authz,
	}
}
127107
func NewPlugin() *Plugin {
	return &Plugin{
		Handler:  admission.NewHandler(admission.Create),
		features: utilfeature.DefaultFeatureGate,
	}
}
342585
func New() (interface{}, error) {
	db := new()
	dbType := dbplugin.NewDatabaseErrorSanitizerMiddleware(db, db.secretValues)

	return dbType, nil
}
572669
func New(cfg ...Config) *Typescript {
	c := DefaultConfig()
	if len(cfg) > 0 {
		c = cfg[0]
	}

	return &Typescript{Config: &c}
}
206319
func New(exec utilexec.Interface, dbus utildbus.Interface, protocol Protocol) Interface {
	return newInternal(exec, dbus, protocol, "")
}
565946
func New(cfg engine.Frontend, be *backend.T, opts proxy.Options,
	mwCfgs map[engine.MiddlewareKey]engine.Middleware,
	listeners plugin.FrontendListeners,
) *T {
	if mwCfgs == nil {
		mwCfgs = make(map[engine.MiddlewareKey]engine.Middleware)
	}
	fe := T{
		cfg:       cfg,
		trustXFDH: opts.TrustForwardHeader,
		mwCfgs:    mwCfgs,
		backend:   be,
		listeners: listeners,
	}
	return &fe
}
665763
func New(cfg interface{}, gadgets ...Gadgeter) *App {
	config := GetConfig(cfg)
	return &App{
		gadgets: config.CreateGadgets(gadgets...),
	}
}
292956
func New(config Config) (f *Fluent, err error) {
	if config.FluentNetwork == "" {
		config.FluentNetwork = defaultNetwork
	}
	if config.FluentHost == "" {
		config.FluentHost = defaultHost
	}
	if config.FluentPort == 0 {
		config.FluentPort = defaultPort
	}
	if config.FluentSocketPath == "" {
		config.FluentSocketPath = defaultSocketPath
	}
	if config.Timeout == 0 {
		config.Timeout = defaultTimeout
	}
	if config.WriteTimeout == 0 {
		config.WriteTimeout = defaultWriteTimeout
	}
	if config.BufferLimit == 0 {
		config.BufferLimit = defaultBufferLimit
	}
	if config.RetryWait == 0 {
		config.RetryWait = defaultRetryWait
	}
	if config.MaxRetry == 0 {
		config.MaxRetry = defaultMaxRetry
	}
	if config.MaxRetryWait == 0 {
		config.MaxRetryWait = defaultMaxRetryWait
	}
	if config.AsyncConnect {
		fmt.Fprintf(os.Stderr, "fluent#New: AsyncConnect is now deprecated, please use Async instead")
		config.Async = config.Async || config.AsyncConnect
	}
	if config.Async {
		f = &Fluent{
			Config:  config,
			pending: make(chan *msgToSend, config.BufferLimit),
		}
		f.wg.Add(1)
		go f.run()
	} else {
		f = &Fluent{Config: config}
		err = f.connect()
	}
	return
}
1330153
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Cilium {
	// ensure nullable parameters have default
	if formats == nil {
		formats = strfmt.Default
	}

	cli := new(Cilium)
	cli.Transport = transport

	cli.Daemon = daemon.New(transport, formats)

	cli.Endpoint = endpoint.New(transport, formats)

	cli.IPAM = ipam.New(transport, formats)

	cli.Metrics = metrics.New(transport, formats)

	cli.Policy = policy.New(transport, formats)

	cli.Prefilter = prefilter.New(transport, formats)

	cli.Service = service.New(transport, formats)

	return cli
}
71351
func (c *context) New(prefixes ...interface{}) Logger {
	return newContext(c.logger, c.prefix, prefixes...)
}