// NewIAMSys - creates new config system object.
761317
func NewIAMSys() *IAMSys {
	return &IAMSys{
		iamUsersMap:        make(map[string]auth.Credentials),
		iamPolicyMap:       make(map[string]string),
		iamCannedPolicyMap: make(map[string]iampolicy.Policy),
	}
}
569962
func NewConsM(meta iseq.PMap, first interface{}, more iseq.Seq) *Cons {
	return &Cons{AMeta: AMeta{meta}, first: first, more: more}
}
230239
func (factory *NagiosBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface {
	bee := NagiosBee{
		Bee: bees.NewBee(name, factory.ID(), description, options),
	}
	bee.services = make(map[string]map[string]service)
	bee.ReloadOptions(options)

	return &bee
}
654281
func NewFS(config libkbfs.Config, log logger.Logger) keybase1.FsInterface {
	return &fs{config: config, log: log}
}
979739
func New(cnf *config.Config, servers []string) iface.Backend {
	return &Backend{
		Backend: common.NewBackend(cnf),
		servers: servers,
	}
}
1136692
func (c completedConfig) New() (*KopsServer, error) {
	genericServer, err := c.GenericConfig.New("kops-apiserver", genericapiserver.NewEmptyDelegate())
	if err != nil {
		return nil, err
	}

	s := &KopsServer{
		GenericAPIServer: genericServer,
	}

	apiGroupInfo := server.NewDefaultAPIGroupInfo(kops.GroupName, Scheme, metav1.ParameterCodec, Codecs)

	//	apiGroupInfo.GroupMeta.GroupVersion = v1alpha2.SchemeGroupVersion

	// {
	// 	v1alpha1storage := map[string]rest.Storage{}
	// 	v1alpha1storage["clusters"], err = registrycluster.NewREST(Scheme, c.GenericConfig.RESTOptionsGetter)
	// 	if err != nil {
	// 		return nil, fmt.Errorf("error initializing clusters: %v", err)
	// 	}
	// 	//v1alpha2stv1alpha1storageorage["clusters/full"] = registrycluster.NewREST(c.RESTOptionsGetter)
	// 	v1alpha1storage["instancegroups"], err = registryinstancegroup.NewREST(Scheme, c.GenericConfig.RESTOptionsGetter)
	// 	if err != nil {
	// 		return nil, fmt.Errorf("error initializing instancegroups: %v", err)
	// 	}
	// 	apiGroupInfo.VersionedResourcesStorageMap["v1alpha1"] = v1alpha1storage
	// }

	{
		v1alpha2storage := map[string]rest.Storage{}
		v1alpha2storage["clusters"], err = registrycluster.NewREST(Scheme, c.GenericConfig.RESTOptionsGetter)
		if err != nil {
			return nil, fmt.Errorf("error initializing clusters: %v", err)
		}
		//v1alpha2storage["clusters/full"] = registrycluster.NewREST(c.RESTOptionsGetter)
		v1alpha2storage["instancegroups"], err = registryinstancegroup.NewREST(Scheme, c.GenericConfig.RESTOptionsGetter)
		if err != nil {
			return nil, fmt.Errorf("error initializing instancegroups: %v", err)
		}
		apiGroupInfo.VersionedResourcesStorageMap["v1alpha2"] = v1alpha2storage
	}

	if err := s.GenericAPIServer.InstallAPIGroup(&apiGroupInfo); err != nil {
		return nil, err
	}

	return s, nil
}
223012
func (d *Dock) NewMenu(i []*MenuItemOptions) *Menu {
	return newMenu(d.ctx, d.id, i, d.c, d.d, d.i, d.w)
}
835225
func NewIdxConfig() *IdxConfig {
	return &IdxConfig{
		Enabled:           false,
		GcpProject:        "default",
		BigtableInstance:  "default",
		TableName:         "metrics",
		WriteQueueSize:    100000,
		WriteMaxFlushSize: 10000,
		WriteConcurrency:  5,
		UpdateBigtableIdx: true,
		UpdateInterval:    time.Hour * 3,
		PruneInterval:     time.Hour * 3,
		CreateCF:          true,
	}
}
601993
func NewDiskSystem(basePath ...string) FileSystem {

	base := ""

	if len(basePath) > 0 {
		base = basePath[0]
	}

	return &diskFileSystem{base}
}
573953
func New(cfg ...Config) *Service {
	c := DefaultConfig()
	if len(cfg) > 0 {
		c = cfg[0]
	}
	r := &Service{pool: &redis.Pool{}, Config: &c}
	return r
}
281200
func NewConfig() Config {
	return &spiConfig{
		bus:   NotInitialized,
		chip:  NotInitialized,
		mode:  NotInitialized,
		bits:  NotInitialized,
		speed: NotInitialized}
}
1042247
func newLeases(c *CoordinationV1beta1Client, namespace string) *leases {
	return &leases{
		client: c.RESTClient(),
		ns:     namespace,
	}
}
1340090
func NewNotificationSys(config *serverConfig, endpoints EndpointList) *NotificationSys {
	targetList := getNotificationTargets(config)
	remoteHosts := getRemoteHosts(endpoints)
	remoteClients, err := getRestClients(remoteHosts)
	if err != nil {
		logger.FatalIf(err, "Unable to start notification sub system")
	}

	// bucketRulesMap/bucketRemoteTargetRulesMap are initialized by NotificationSys.Init()
	return &NotificationSys{
		targetList:                 targetList,
		bucketRulesMap:             make(map[string]event.RulesMap),
		bucketRemoteTargetRulesMap: make(map[string]map[event.TargetID]event.RulesMap),
		peerClients:                remoteClients,
	}
}
796498
func New(cnf *config.Config) iface.Backend {
	backend := &Backend{Backend: common.NewBackend(cnf), cnf: cnf}

	if cnf.DynamoDB != nil && cnf.DynamoDB.Client != nil {
		backend.client = cnf.DynamoDB.Client
	} else {
		sess := session.Must(session.NewSessionWithOptions(session.Options{
			SharedConfigState: session.SharedConfigEnable,
		}))
		backend.client = dynamodb.New(sess)
	}

	// Check if needed tables exist
	err := backend.checkRequiredTablesIfExist()
	if err != nil {
		log.FATAL.Printf("Failed to prepare tables. Error: %v", err)
	}
	return backend
}
1096551
func New(config *Config, commit string, logdir string) *Dashboard {
	now := time.Now()
	versionMeta := ""
	if len(params.VersionMeta) > 0 {
		versionMeta = fmt.Sprintf(" (%s)", params.VersionMeta)
	}
	return &Dashboard{
		conns:  make(map[uint32]*client),
		config: config,
		quit:   make(chan chan error),
		history: &Message{
			General: &GeneralMessage{
				Commit:  commit,
				Version: fmt.Sprintf("v%d.%d.%d%s", params.VersionMajor, params.VersionMinor, params.VersionPatch, versionMeta),
			},
			System: &SystemMessage{
				ActiveMemory:   emptyChartEntries(now, sampleLimit),
				VirtualMemory:  emptyChartEntries(now, sampleLimit),
				NetworkIngress: emptyChartEntries(now, sampleLimit),
				NetworkEgress:  emptyChartEntries(now, sampleLimit),
				ProcessCPU:     emptyChartEntries(now, sampleLimit),
				SystemCPU:      emptyChartEntries(now, sampleLimit),
				DiskRead:       emptyChartEntries(now, sampleLimit),
				DiskWrite:      emptyChartEntries(now, sampleLimit),
			},
		},
		logdir: logdir,
	}
}
1892
func NewFileSystemAPIServer(store store.GroupStore) *FileSystemAPIServer {
	s := new(FileSystemAPIServer)
	s.gstore = store
	return s
}
948235
func NewFileSystem(ipfs *core.IpfsNode, sk ci.PrivKey, ipfspath, ipnspath string) (*FileSystem, error) {

	kmap := map[string]ci.PrivKey{
		"local": sk,
	}
	root, err := CreateRoot(ipfs, kmap, ipfspath, ipnspath)
	if err != nil {
		return nil, err
	}

	return &FileSystem{Ipfs: ipfs, RootNode: root}, nil
}