factory

package
v0.0.0-...-ca3ac9b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STGClassSimpleFile = "simplefile"
	STGClassS3         = "s3storage"
	STGClassFastcache  = "fastcache"
	STGClassSFMV       = "sfmv"
)

name of storage classes

Variables

View Source
var ErrNoStg = errors.New("no storage class given")

ErrNoStg error for no storage class given

Functions

func CreateRetentionManager

func CreateRetentionManager(rtnMgrStr string, tntsrv interfaces.TenantManager) (interfaces.RetentionManager, error)

CreateRetentionManager creates a new Retention manager depending ot he configuration

func CreateTenantManager

func CreateTenantManager(stg config.Storage) (interfaces.TenantManager, error)

CreateTenantManager creating a new tenant service depending on the configuration

Types

type DefaultStorageFactory

type DefaultStorageFactory struct {
	TenantMgr interfaces.TenantManager
	RtnMgr    interfaces.RetentionManager
	CchSrv    interfaces.BlobStorage
	// contains filtered or unexported fields
}

DefaultStorageFactory the struct for the default storage factory

func (*DefaultStorageFactory) Close

func (d *DefaultStorageFactory) Close() error

Close closing this default storage factory

func (*DefaultStorageFactory) GetStorage

func (d *DefaultStorageFactory) GetStorage(tenant string) (interfaces.BlobStorage, error)

GetStorage return the storage for the desired tenant

func (*DefaultStorageFactory) Init

Init initialize the factory

func (*DefaultStorageFactory) RemoveStorage

func (d *DefaultStorageFactory) RemoveStorage(tenant string) error

RemoveStorage removes a tenant storage from the cache

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL