// RegisterStorageExecutor registers a StorageExecutor.
320065
func RegisterStorageExecutor(name string, ctor types.NewStorageExecutor) {
	storExecsCtorsRWL.Lock()
	defer storExecsCtorsRWL.Unlock()
	storExecsCtors[strings.ToLower(name)] = ctor
}
1297803
func (s *Partition) SetStorageDescriptor(v *StorageDescriptor) *Partition {
	s.StorageDescriptor = v
	return s
}
1182032
func registerDrivers() {
	registeredDrivers = map[string]common.StoreGenerator{
		// Memory only storage driver.
		"VOLATILE": func() (storage.Store, error) {
			return memory.NewStore(), nil
		},
	}
}
651949
func RegisterMutator(name string, m Mutator) {
	mu.Lock()
	defer mu.Unlock()

	mutators = append(mutators, m)
	mutatorNames = append(mutatorNames, name)
}
1349314
func RegisterOpenStorageClusterHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
	return RegisterOpenStorageClusterHandlerClient(ctx, mux, NewOpenStorageClusterClient(conn))
}
115123
func (s *HostService) AddSecondaryStorage(p *AddSecondaryStorageParams) (*AddSecondaryStorageResponse, error) {
	resp, err := s.cs.newRequest("addSecondaryStorage", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r AddSecondaryStorageResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
232079
func (o *OracleEnviron) StorageProvider(t storage.ProviderType) (storage.Provider, error) {
	access, err := o.canAccessStorageAPI()
	if err != nil {
		return nil, errors.Trace(err)
	}
	if access && t == oracleStorageProviderType {
		return &storageProvider{
			env: o,
			api: o.client,
		}, nil
	}

	return nil, errors.NotFoundf("storage provider %q", t)
}
1073862
func StorageReader(storage StorageAPI, volume, path string, offset int64) io.Reader {
	return &storageReader{storage, volume, path, offset}
}
666012
func triggerCacheIndexer(obj interface{}) ([]string, error) {
	entry := obj.(*trigger.CacheEntry)
	var keys []string
	for _, t := range entry.Triggers {
		if t.From.Kind != "ImageStreamTag" || len(t.From.APIVersion) != 0 || t.Paused {
			continue
		}
		name, _, ok := imageapi.SplitImageStreamTag(t.From.Name)
		if !ok {
			continue
		}
		namespace := t.From.Namespace
		if len(namespace) == 0 {
			namespace = entry.Namespace
		}
		keys = append(keys, namespace+"/"+name)
	}
	return keys, nil
}
284895
func StorageProviders() storage.ProviderRegistry {
	return storage.StaticProviderRegistry{
		map[storage.ProviderType]storage.Provider{
			"static": &StorageProvider{IsDynamic: false},
			"modelscoped": &StorageProvider{
				StorageScope: storage.ScopeEnviron,
				IsDynamic:    true,
				IsReleasable: true,
			},
			"modelscoped-unreleasable": &StorageProvider{
				StorageScope: storage.ScopeEnviron,
				IsDynamic:    true,
				IsReleasable: false,
			},
			"modelscoped-block": &StorageProvider{
				StorageScope: storage.ScopeEnviron,
				IsDynamic:    true,
				IsReleasable: true,
				SupportsFunc: func(k storage.StorageKind) bool {
					return k == storage.StorageKindBlock
				},
			},
			"machinescoped": &StorageProvider{
				StorageScope: storage.ScopeMachine,
				IsDynamic:    true,
			},
		},
	}
}
186986
func StorageDrivers() <-chan types.StorageDriver {
	c := make(chan types.StorageDriver)
	go func() {
		storDriverCtorsRWL.RLock()
		defer storDriverCtorsRWL.RUnlock()
		for _, ctor := range storDriverCtors {
			c <- ctor()
		}
		close(c)
	}()
	return c
}
1247247
func (s *storageImpl) registerTasks() {
	// See queue.yaml for "cas-uploads" task queue definition.
	s.tq.RegisterTask(&tasks.VerifyUpload{}, func(c context.Context, m proto.Message) error {
		return s.verifyUploadTask(c, m.(*tasks.VerifyUpload))
	}, "cas-uploads", nil)
	s.tq.RegisterTask(&tasks.CleanupUpload{}, func(c context.Context, m proto.Message) error {
		return s.cleanupUploadTask(c, m.(*tasks.CleanupUpload))
	}, "cas-uploads", nil)
}
446115
func (m *MockZonedEnviron) StorageProvider(arg0 storage.ProviderType) (storage.Provider, error) {
	ret := m.ctrl.Call(m, "StorageProvider", arg0)
	ret0, _ := ret[0].(storage.Provider)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
682572
func RegisterCompressor(method uint16, comp Compressor) {
	mu.Lock()
	defer mu.Unlock()

	if _, ok := compressors[method]; ok {
		panic("compressor already registered")
	}
	compressors[method] = comp
}
585957
func RegisterLRUCache(capacity int) LRUHandle {
	checkStillInitTime()
	registeredCaches = append(registeredCaches, registeredCache{capacity})
	return LRUHandle(len(registeredCaches) - 1)
}
1324504
func Storage(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "storage", Listener: listener}
}
1228543
func (mr *MockZonedEnvironMockRecorder) StorageProvider(arg0 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StorageProvider", reflect.TypeOf((*MockZonedEnviron)(nil).StorageProvider), arg0)
}