// RegisterDialect adds the given Dialect to the registry at the given name.
432148
func RegisterDialect(name string, d Dialect) {
	if d == nil {
		log.Panic("aspect: unable to register a nil Dialect")
	}
	if _, duplicate := dialects[name]; duplicate {
		log.Panic("aspect: a Dialect with this name already exists")
	}
	dialects[name] = d
}
364860
func Register(pl plugin.Plugin) error {
	for _, p := range plugin.Plugins() {
		if p.String() == pl.String() {
			return fmt.Errorf("%s registered globally", pl.String())
		}
	}
	return defaultManager.Register(pl)
}
260491
func RegisterConstant(name string, num int) {
	nm := strings.ToUpper(name)
	AllConstants[nm] = num
	AllConstantNumbers[num] = append(AllConstantNumbers[num], nm)
}
1351334
func Register(r types.ConfigRegistration) {
	registrationsRWL.Lock()
	defer registrationsRWL.Unlock()
	for x, rr := range registrations {
		if rr.Name() == r.Name() {
			registrations[x] = r
			return
		}
	}
	registrations = append(registrations, r)
}
634038
func (r Registry) Register(name string, factory PluginFactory) error {
	if _, ok := r[name]; ok {
		return fmt.Errorf("a plugin named %v already exists", name)
	}
	r[name] = factory
	return nil
}
1039905
func RegisterPlugin(name string, plugin Plugin) error {
	pluginMutex.Lock()
	defer pluginMutex.Unlock()
	pluginList[name] = plugin

	return nil
}
1162501
func registerService(name string, port int, ttl int) {

	reportInterval := make(chan bool, 1)
	go func() {
		for {
			time.Sleep(time.Duration(ttl) / 2 * time.Second)
			reportInterval <- true
		}
	}()

	client, err := consul.NewClient(consul.DefaultConfig())
	if nil != err {
		log.Error("Failed to get consul client")
	}
	agent := client.Agent()

	serviceRegister(name, port, ttl, agent)
	for {
		select {
		case <-reportInterval: //report registration
			{
				servicePassing(name, agent)

			}
		}
	}

}
1344273
func Register(name string, plugin Pluggable) error {
	var err error

	switch Type(plugin.PluginType()) {
	case AgentProviderPlugin:
		err = registerAgentProviderPlugin(name, plugin)

	case AgentPlugin:
		err = registerAgentPlugin(name, plugin)

	case ProvisionTargetResolverPlugin:
		err = registerProvisionTargetResolverPlugin(name, plugin)

	case ConfigMutatorPlugin:
		err = registerConfigMutator(name, plugin)

	default:
		err = fmt.Errorf("unknown plugin type %d from %s", plugin.PluginType(), name)
	}

	return err
}
569897
func (w *CeleryWorker) Register(name string, task interface{}) {
	w.taskLock.Lock()
	w.registeredTasks[name] = task
	w.taskLock.Unlock()
}
140265
func RegisterGRPCDialOptions(grpcDialOptionsFunc func(opts []grpc.DialOption) ([]grpc.DialOption, error)) {
	grpcDialOptions = append(grpcDialOptions, grpcDialOptionsFunc)
}
605453
func (ar *ActionRepository) RegisterTabletAction(name, role string, method actionTabletMethod) {
	ar.tabletActions[name] = actionTabletRecord{
		role:   role,
		method: method,
	}
}
146622
func (cl *CommandLine) Register(key, defaultValue string, params map[string]string, t reflect.Type) error {
	if _, ok := cl.flags[key]; ok {
		return ErrKeyExists
	}
	key = camelToFlag(key)

	// TODO validate key?
	// TODO use typed calls instead of StringVar
	printf("Got type %s", t.Kind())
	switch t.Kind() {
	case reflect.Slice:
		printf("Registering slice type for %s", key)
		var val arrayValue
		if len(defaultValue) > 0 {
			val = append(val, defaultValue)
		}
		cl.arrayFlags[key] = &val

		// TODO validate description in some way?
		desc := params["flagDesc"]

		flag.Var(&val, key, desc)
	default:
		printf("Registering default type for %s", key)
		val := defaultValue
		cl.flags[key] = &val

		// TODO validate description in some way?
		desc := params["flagDesc"]

		flag.StringVar(&val, key, defaultValue, desc)
	}

	return nil
}
849016
func RegisterFunc(name string, fn func(c *ConfigParser, v []interface{}) (interface{}, error)) {
	if len(name) < 2 || !strings.HasPrefix(name, "_") {
		panic("illegal name")
	}
	if _, dup := regFunc[name]; dup {
		panic("duplicate registration of " + name)
	}
	regFunc[name] = fn
}
640665
func (tpl *Template) RegisterHelper(name string, helper interface{}) {
	tpl.mutex.Lock()
	defer tpl.mutex.Unlock()

	if tpl.helpers[name] != zero {
		panic(fmt.Sprintf("Helper %s already registered", name))
	}

	val := reflect.ValueOf(helper)
	ensureValidHelper(name, val)

	tpl.helpers[name] = val
}
759364
func RegisterFormat(f Format) {
	if _, ok := formatsByName[f.Name]; ok {
		panic(fmt.Errorf("format %s is allready registered", f.Name))
	}
	formatsByName[f.Name] = &f
	for _, m := range f.Ext {
		if sf, ok := formatsByExt[m]; ok {
			panic(fmt.Errorf("format %s is allready registered with MIME %s", sf.Name, m))
		}
		formatsByExt[m] = &f
	}
	for _, m := range f.Mime {
		if sf, ok := formatsByMime[m]; ok {
			panic(fmt.Errorf("format %s is allready registered with MIME %s", sf.Name, m))
		}
		formatsByMime[m] = &f
	}
}
905169
func (n *Namespace) RegisterDefinition(d Definition) error {
	if curDef, ok := n.Definitions[d.AvroName()]; ok {
		if !reflect.DeepEqual(curDef, d) {
			return fmt.Errorf("Conflicting definitions for %v", d.AvroName())
		}
		return nil
	}
	n.Definitions[d.AvroName()] = d

	for _, alias := range d.Aliases() {
		if existing, ok := n.Definitions[alias]; ok {
			return fmt.Errorf("Alias for %q is %q, but %q is already aliased with that name", d.AvroName(), alias, existing.AvroName())
		}
		n.Definitions[alias] = d
	}
	return nil
}
199519
func (a *Module) Register(p string, v interface{}, methods ...string) *Module {
	if len(methods) < 1 {
		methods = append(methods, "GET")
	}
	a.Application.URLBuilder.Set(v)
	h := a.Core.ValidHandler(v)
	a.Router().Match(methods, p, func(ctx echo.Context) error {
		if c, y := ctx.(Initer); y {
			if err := c.Init(ctx); err != nil {
				return err
			}
		}
		return h.Handle(ctx)
	})
	return a
}