multitenant

package
v0.0.0-...-146a38b Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: BSD-3-Clause, MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EntrySavedMessage             = "Entry saved in cache store"
	CouldNotSaveEntryErrorMessage = "Could not save entry in cache store"
)

Functions

This section is empty.

Types

type HTTPError

type HTTPError struct {
	Status  int
	Message string
}

type MultiTenantServer

type MultiTenantServer struct {
	Logger                 *cm_logger.Logger
	Router                 *cm_router.Router
	StorageBackend         storage.Backend
	ExternalCacheStore     cache.Store
	InternalCacheStore     map[string]*cacheEntry
	MaxStorageObjects      int
	IndexLimit             int
	AllowOverwrite         bool
	APIEnabled             bool
	UseStatefiles          bool
	ChartURL               string
	ChartPostFormFieldName string
	ProvPostFormFieldName  string
	Limiter                chan struct{}
	Tenants                map[string]*tenantInternals
	TenantCacheKeyLock     *sync.Mutex
}

MultiTenantServer contains a Logger, Router, storage backend and object cache

func NewMultiTenantServer

func NewMultiTenantServer(options MultiTenantServerOptions) (*MultiTenantServer, error)

NewMultiTenantServer creates a new MultiTenantServer instance

func (*MultiTenantServer) Listen

func (server *MultiTenantServer) Listen(port int)

Listen starts the router on a given port

func (*MultiTenantServer) Routes

func (s *MultiTenantServer) Routes() []*cm_router.Route

type MultiTenantServerOptions

type MultiTenantServerOptions struct {
	Logger                 *cm_logger.Logger
	Router                 *cm_router.Router
	StorageBackend         storage.Backend
	ExternalCacheStore     cache.Store
	ChartURL               string
	ChartPostFormFieldName string
	ProvPostFormFieldName  string
	MaxStorageObjects      int
	IndexLimit             int
	GenIndex               bool
	AllowOverwrite         bool
	EnableAPI              bool
	UseStatefiles          bool
}

MultiTenantServerOptions are options for constructing a MultiTenantServer

type StorageObject

type StorageObject struct {
	*storage.Object
	ContentType string
}

Jump to

Keyboard shortcuts

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