// Register is used to register a quota spec.
965723
func (q *Quotas) Register(spec *QuotaSpec, qo *WriteOptions) (*WriteMeta, error) {
	wm, err := q.client.write("/v1/quota", spec, nil, qo)
	if err != nil {
		return nil, err
	}
	return wm, nil
}
98953
func (c *Collection) Register(fns ...func(DB) error) error {
	return c.register(false, fns...)
}
620308
func Register(v interface{}, args ...string) {
	var (
		t = tryDereference(v)
		p = path.Join(args...)
	)
	mu.Lock()
	defer mu.Unlock()
	if et, ok := registry[t]; ok {
		if et != p {
			panic(errors.Errorf("type registred with alternate path %q != %q", et, p))
		}
		return
	}
	registry[t] = p
}
818304
func (L *State) register(f interface{}) uint {
	//fmt.Printf("Registering %v\n")
	index, ok := L.getFreeIndex()
	//fmt.Printf("\tfreeindex: index = %v, ok = %v\n", index, ok)
	//if not ok, then we need to add new index by extending the slice
	if !ok {
		index = uint(len(L.registry))
		//reallocate backing array if necessary
		if index+1 > uint(cap(L.registry)) {
			newSlice := make([]interface{}, index, cap(L.registry)*2)
			copy(newSlice, L.registry)
			L.registry = newSlice
		}
		//reslice
		L.registry = L.registry[0 : index+1]
	}
	//fmt.Printf("\tregistering %d %v\n", index, f)
	L.registry[index] = f
	return index
}
1172568
func (p *simpleResourcePool) Register(resourceLocation string) error {
	if resourceLocation == "" {
		return errors.New("Invalid resource location")
	}

	p.mutex.Lock()
	defer p.mutex.Unlock()

	if p.isLameDuck {
		return fmt.Errorf(
			"cannot register %s to lame duck resource pool",
			resourceLocation)
	}

	if p.location == "" {
		p.location = resourceLocation
		return nil
	}
	return errors.New("SimpleResourcePool can only register one location")
}
1192227
func Register(s *grpc.Server, server queryservice.QueryService) {
	queryservicepb.RegisterQueryServer(s, &query{server})
}
131913
func Register(mimeType string, format string) {
	mime.AddExtensionType("."+strings.TrimPrefix(format, "."), mimeType)
}
1059144
func (c *Cache) Register(ch chan<- sd.Event) {
	c.mtx.Lock()
	defer c.mtx.Unlock()
	c.reg.register(ch)
	// always push the current state to new channels
	ch <- c.state
}
104264
func (r *Registry) Register(registrant Registrant) {
	if _, ok := r.registrants[registrant.Name()]; ok {
		panic(fmt.Sprintf("%s: registrant %q already registered", r.name, registrant.Name()))
	}
	r.registrants[registrant.Name()] = registrant
}
291057
func (sb *SchemeBuilder) Register(funcs ...func(*Scheme) error) {
	for _, f := range funcs {
		*sb = append(*sb, f)
	}
}
84270
func (kv *KV) Register(table []byte) error {
	if len(table) == 0 {
		return gkv.ErrTableName
	}
	kv.table = table
	return kv.db.Update(func(tx *bolt.Tx) error {
		_, err := tx.CreateBucketIfNotExists(table)
		if err != nil {
			return fmt.Errorf("CreateBucketIfNotExists error: %s",
				err.Error())
		}
		return nil
	})
}
216903
func (_FIFSRegistrar *FIFSRegistrarTransactor) Register(opts *bind.TransactOpts, label [32]byte, owner common.Address) (*types.Transaction, error) {
	return _FIFSRegistrar.contract.Transact(opts, "register", label, owner)
}
97926
func Register(value interface{}, enc encoderFunc, dec decoderFunc) {
	typ := reflect.TypeOf(value)
	if enc != nil {
		typEncMap[typ] = enc
	}
	if dec != nil {
		typDecMap[typ] = dec
	}
}
841798
func (cp *CallbackProcessor) Register(callbackName string, callback func(scope *Scope)) {
	if cp.kind == "row_query" {
		if cp.before == "" && cp.after == "" && callbackName != "gorm:row_query" {
			log.Printf("Registing RowQuery callback %v without specify order with Before(), After(), applying Before('gorm:row_query') by default for compatibility...\n", callbackName)
			cp.before = "gorm:row_query"
		}
	}

	cp.name = callbackName
	cp.processor = &callback
	cp.parent.processors = append(cp.parent.processors, cp)
	cp.parent.reorder()
}
77698
func (cli *Client) Register(req *ReqRegister) (*RespRegister, *RespUserInteractive, error) {
	u := cli.BuildURL("register")
	return cli.register(u, req)
}
322118
func Register(style *chroma.Style) *chroma.Style {
	Registry[style.Name] = style
	return style
}
1000062
func Register() {
	// Inherit standard logger flags and prefix if appropriate
	if !std.customFmt {
		std.formatter.SetFlags(log.Flags())
	}

	if log.Prefix() != "" && std.prefix == "" {
		std.SetPrefix(log.Prefix())
	}

	// Disable all extras
	log.SetPrefix("")
	log.SetFlags(0)

	// Set CoLog as output
	log.SetOutput(std)
}