multitenant

package
v0.13.5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Apache-2.0 Imports: 26 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
	TimestampTolerance     time.Duration
	ExternalCacheStore     cache.Store
	InternalCacheStore     map[string]*cacheEntry
	MaxStorageObjects      int
	IndexLimit             int
	AllowOverwrite         bool
	AllowForceOverwrite    bool
	APIEnabled             bool
	DisableDelete          bool
	UseStatefiles          bool
	EnforceSemver2         bool
	ChartURL               string
	ChartPostFormFieldName string
	ProvPostFormFieldName  string
	Version                string
	Limiter                chan struct{}
	Tenants                map[string]*tenantInternals
	TenantCacheKeyLock     *sync.Mutex
	CacheInterval          time.Duration
	EventChan              chan event
}

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
	TimestampTolerance     time.Duration
	ChartURL               string
	ChartPostFormFieldName string
	ProvPostFormFieldName  string
	Version                string
	MaxStorageObjects      int
	IndexLimit             int
	GenIndex               bool
	AllowOverwrite         bool
	AllowForceOverwrite    bool
	EnableAPI              bool
	DisableDelete          bool
	UseStatefiles          bool
	EnforceSemver2         bool
	CacheInterval          time.Duration
}

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