// NewRegistry create schema registry.
978608
func NewRegistry(applyer Applyer) *Registry {
	return &Registry{
		applyer:     applyer,
		sources:     make(map[string]Source),
		schemas:     make(map[string]*Schema),
		schemaNames: make([]string, 0),
	}
}
199310
func NewHandlerRegistry(allowUnsolicitedRegistration bool) *HandlerRegistry {
	return &HandlerRegistry{
		handlers:                     map[string]*Handler{},
		launching:                    map[string]*LaunchState{},
		allowUnsolicitedRegistration: allowUnsolicitedRegistration,
	}
}
845205
func (s *Server) UpgradeRegistry(req UpgradeDockerRequest, reply *int) error {
	return s.f.UpgradeRegistry(s.context(), req.Endpoint, req.Override)
}
124067
func Registry() (c *RegistryController) {
	return &RegistryController{
		List:   registryList,
		Create: registryCreate,
		Delete: registryDelete,
		Update: registryUpdate,
	}
}
82337
func registerNewCodec(st map[string]*Codec, schemaMap map[string]interface{}, enclosingNamespace string) (*Codec, error) {
	n, err := newNameFromSchemaMap(enclosingNamespace, schemaMap)
	if err != nil {
		return nil, err
	}
	c := &Codec{typeName: n}
	st[n.fullName] = c
	return c, nil
}
390723
func NewRegistry() *Registry {
	r := &Registry{
		objects:  make(map[types.ManagedObjectReference]mo.Reference),
		handlers: make(map[types.ManagedObjectReference]RegisterObject),
		locks:    make(map[types.ManagedObjectReference]sync.Locker),

		Namespace: vim25.Namespace,
		Path:      vim25.Path,
	}

	return r
}
1153535
func loginRegistry(s dockerLoginSettings) error {
	if !s.HasLoginInfo() {
		log.Println("registry login not specificied")
		return nil
	}
	opts := []string{
		"login",
		"--email=" + s.Email,
		"--username=" + s.Username,
		"--password=" + s.Password,
	}
	if s.Server != "" {
		opts = append(opts, s.Server)
	}
	_, err := executil.Exec("docker", opts...)
	if err != nil {
		return errors.New("'docker login' failed")
	}
	return nil
}
1116785
func NewRegistrar(client Client, service Service, logger log.Logger) *Registrar {
	return &Registrar{
		client:  client,
		service: service,
		logger:  log.With(logger, "key", service.Key, "value", service.Value),
	}
}
1186575
func NewRegistry(host string) RegistryEndpoint {
	if host == "docker.io" {
		host = DefaultRegistryHost
	}

	// FIXME somewhere around here either we test for v2 functionality, or return
	// something that suffices the RegistryEndpoint, but can lazily determine v1
	// or v2 registry

	return &registryV1Endpoint{
		host:      host,
		tokens:    map[string]Token{},
		endpoints: []string{},
	}
}
377161
func NewEntry(logger *Logger) *Entry { //todo
	lgEntry := lg.NewEntry(logger.std)
	return &Entry{
		logger:  logger,
		lgEntry: lgEntry,
	}
}
514506
func (c *Client) NewRegistration(accountKey interface{}) (reg Registration, err error) {
	reg, err = c.registration(accountKey, Registration{}, resourceNewRegistration, c.resources.NewRegistration)
	if err != nil || reg.Agreement == c.Terms() {
		return
	}
	reg.Agreement = c.Terms()
	reg, err = c.UpdateRegistration(accountKey, reg)
	return reg, err
}
220658
func NewRegistry() *Registry {
	return &Registry{
		collectorsByID:  map[uint64]Collector{},
		descIDs:         map[uint64]struct{}{},
		dimHashesByName: map[string]uint64{},
	}
}
1010931
func NewProxyRegistry(factory ProxyFactory) ProxyRegistry {
	return &proxyRegistry{
		registry:     make(map[string]Proxy),
		proxyFactory: factory,
	}
}
1289082
func (i Name) Registry() string {
	switch i.Domain {
	case "", oldDockerHubHost:
		return dockerHubHost
	default:
		return i.Domain
	}
}
122100
func NewHandlerFromRegistry(name string, reg *prom.Registry) *Handler {
	h := &Handler{
		name:           name,
		MetricsHandler: reg.HTTPHandler(),
		ReadyHandler:   http.HandlerFunc(ReadyHandler),
		HealthHandler:  http.HandlerFunc(HealthHandler),
		DebugHandler:   http.DefaultServeMux,
	}
	h.initMetrics()
	reg.MustRegister(h.PrometheusCollectors()...)
	return h
}
902539
func NewAppRegistry(appLister applister.ApplicationLister) *prometheus.Registry {
	registry := prometheus.NewRegistry()
	registry.MustRegister(NewAppCollector(appLister))
	return registry
}
1030976
func NewRegisteredCounter(name string, r Registry) Counter {
	c := NewCounter()
	if nil == r {
		r = DefaultRegistry
	}
	r.Register(name, c)
	return c
}