vvm

package
v1.202405300917.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 56 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNumCommandProcessors          istructs.NumCommandProcessors = 10
	DefaultNumQueryProcessors            istructs.NumQueryProcessors   = 10  // <=0 -> 1 query processor will exist anyway
	DefaultQuotasChannelsFactor                                        = 100 // Quotas.Channels will be NumCommandProcessors * DefaultQuotasFactor
	DefaultQuotasChannelsPerSubject                                    = 50
	DefaultQuotasSubscriptionsFactor                                   = 1000 // Quotas.Subscriptions will be NumCommandProcessors * DefaultQuotasSubscriptionsFactor
	DefaultQuotasSubscriptionsPerSubject                               = 100
	DefaultMetricsServicePort                                          = 8000
	DefaultCacheSize                                                   = 1024 * 1024 * 1024 // 1Gb
	ShortestPossibleFunctionNameLen                                    = len("q.a.a")
	DefaultBLOBWorkersNum                                              = 10
	DefaultRetryAfterSecondsOn503                                      = 1
	DefaultMaxPrepareQueries                                           = 10
	DefaultBLOBMaxSize                                                 = router.BLOBMaxSizeType(20971520) // 20Mb
	DefaultVVMPort                                                     = router.DefaultPort
)

Variables

View Source
var (
	LocalHost        = "http://127.0.0.1"
	DefaultTimeFunc  = time.Now
	DefaultCasParams = cas.CassandraParamsType{
		Hosts:                   "127.0.0.1",
		Port:                    defaultCassandraPort,
		KeyspaceWithReplication: cas.SimpleWithReplication,
	}
)
View Source
var ErrVVMLaunchFailure = errors.New("VVM failed to launch")

Functions

This section is empty.

Types

type AppConfigsTypeEmpty

type AppConfigsTypeEmpty istructsmem.AppConfigsType

type AppPartitionFactory

type AppPartitionFactory func(ctx context.Context, appQName istructs.AppQName, asyncProjectors istructs.Projectors, partitionID istructs.PartitionID) pipeline.ISyncOperator

type AppPartsCtlPipelineService

type AppPartsCtlPipelineService struct {
	apppartsctl.IAppPartitionsController
}

func (*AppPartsCtlPipelineService) Prepare

func (srv *AppPartsCtlPipelineService) Prepare(_ interface{}) error

func (*AppPartsCtlPipelineService) Run

func (*AppPartsCtlPipelineService) Stop

func (srv *AppPartsCtlPipelineService) Stop()

type AppServiceFactory

type AppServiceFactory func(ctx context.Context, appQName istructs.AppQName, asyncProjectors istructs.Projectors, appPartsCount istructs.NumAppPartitions) pipeline.ISyncOperator

type AppStorageFactory

type AppStorageFactory func(appQName istructs.AppQName, appStorage istorage.IAppStorage) istorage.IAppStorage

type AppsArtefacts

type AppsArtefacts struct {
	istructsmem.AppConfigsType
	// contains filtered or unexported fields
}

type AsyncActualizersFactory

type AsyncActualizersFactory func(ctx context.Context, appQName istructs.AppQName, asyncProjectors istructs.Projectors, partitionID istructs.PartitionID, opts []state.ActualizerStateOptFunc) pipeline.ISyncOperator

type BlobAppStorage

type BlobAppStorage istorage.IAppStorage

type BlobStorage

type BlobStorage iblobstorage.IBLOBStorage

type BlobberAppClusterID

type BlobberAppClusterID istructs.ClusterAppID

type BlobberAppStruct

type BlobberAppStruct istructs.IAppStructs

type BootstrapOperator

type BootstrapOperator pipeline.ISyncOperator

type BuiltInAppPackages

type BuiltInAppPackages struct {
	appparts.BuiltInApp
	Packages []parser.PackageFS // need for build baseline schemas
}

type BusTimeout

type BusTimeout time.Duration

type CommandChannelFactory

type CommandChannelFactory func(channelIdx int) commandprocessor.CommandChannel

type CommandProcessorsChannelGroupIdxType

type CommandProcessorsChannelGroupIdxType int

type FederationURL

type FederationURL func() *url.URL

type IAppPartsCtlPipelineService

type IAppPartsCtlPipelineService pipeline.IService

type IAppStorageUncachingProviderFactory

type IAppStorageUncachingProviderFactory func() (provider istorage.IAppStorageProvider)

type MaxPrepareQueriesType

type MaxPrepareQueriesType int

type MetricsServiceOperator

type MetricsServiceOperator pipeline.ISyncOperator

type MetricsServicePortInitial

type MetricsServicePortInitial int

type OperatorAppServicesFactory

type OperatorAppServicesFactory func(ctx context.Context) pipeline.ISyncOperator

type OperatorCommandProcessor

type OperatorCommandProcessor pipeline.ISyncOperator

type OperatorCommandProcessors

type OperatorCommandProcessors pipeline.ISyncOperator

type OperatorQueryProcessor

type OperatorQueryProcessor pipeline.ISyncOperator

type OperatorQueryProcessors

type OperatorQueryProcessors pipeline.ISyncOperator

type PostDocDesc

type PostDocDesc struct {
	Kind        appdef.TypeKind
	IsSingleton bool
}

type PostDocFieldType

type PostDocFieldType struct {
	Kind              appdef.DataKind
	Required          bool
	VerificationKinds []appdef.VerificationKind // empty -> not verified
}

type ProcesorChannel

type ProcesorChannel struct {
	iprocbusmem.ChannelGroup
	ChannelType ProcessorChannelType
}

type ProcessorChannelType

type ProcessorChannelType int
const (
	ProcessorChannel_Command ProcessorChannelType = iota
	ProcessorChannel_Query
)

type QueryChannel

type QueryChannel iprocbus.ServiceChannel

type QueryProcessorsChannelGroupIdxType

type QueryProcessorsChannelGroupIdxType int

type RouterServiceOperator

type RouterServiceOperator pipeline.ISyncOperator

type ServiceChannelFactory

type ServiceChannelFactory func(pcgt ProcessorChannelType, channelIdx int) iprocbus.ServiceChannel

type ServicePipeline

type ServicePipeline pipeline.ISyncPipeline

type StorageCacheSizeType

type StorageCacheSizeType int

type VVM

type VVM struct {
	ServicePipeline
	apps.APIs
	appparts.IAppPartitions
	AppsExtensionPoints map[istructs.AppQName]extensionpoints.IExtensionPoint
	MetricsServicePort  func() metrics.MetricsServicePort
	BuiltInAppsPackages []BuiltInAppPackages
}

func ProvideCluster

func ProvideCluster(vvmCtx context.Context, vvmConfig *VVMConfig, vvmIdx VVMIdxType) (*VVM, func(), error)

vvmCtx must be cancelled by the caller right before vvm.ServicePipeline.Close()

type VVMApps

type VVMApps []istructs.AppQName

func (*VVMApps) Exists

func (ha *VVMApps) Exists(name istructs.AppQName) bool

type VVMAppsBuilder

type VVMAppsBuilder map[istructs.AppQName]apps.AppBuilder

func (VVMAppsBuilder) Add

func (ab VVMAppsBuilder) Add(appQName istructs.AppQName, builder apps.AppBuilder)

func (VVMAppsBuilder) BuildAppsArtefacts

func (ab VVMAppsBuilder) BuildAppsArtefacts(apis apps.APIs, emptyCfgs AppConfigsTypeEmpty) (appsArtefacts AppsArtefacts, err error)

type VVMConfig

type VVMConfig struct {
	VVMAppsBuilder             VVMAppsBuilder // is a map
	TimeFunc                   coreutils.TimeFunc
	RouterWriteTimeout         int
	RouterReadTimeout          int
	RouterConnectionsLimit     int
	RouterHTTP01ChallengeHosts []string
	RouteDefault               string
	Routes                     map[string]string
	RoutesRewrite              map[string]string
	RouteDomains               map[string]string
	BusTimeout                 BusTimeout
	Quotas                     in10n.Quotas
	StorageFactory             func() (provider istorage.IAppStorageFactory, err error)
	BlobberServiceChannels     router.BlobberServiceChannels
	BLOBMaxSize                router.BLOBMaxSizeType
	Name                       commandprocessor.VVMName
	NumCommandProcessors       istructs.NumCommandProcessors
	NumQueryProcessors         istructs.NumQueryProcessors
	MaxPrepareQueries          MaxPrepareQueriesType
	StorageCacheSize           StorageCacheSizeType

	// 0 -> dynamic port will be used, new on each vvmIdx
	// >0 -> vVMPort+vvmIdx will be actually used
	VVMPort            VVMPortType
	MetricsServicePort MetricsServicePortInitial
	// test and FederationURL contains port -> the port will be relaced with the actual VVMPort
	FederationURL       *url.URL
	ActualizerStateOpts []state.ActualizerStateOptFunc
	SecretsReader       isecrets.ISecretReader
	// used in tests only
	KeyspaceNameSuffix string
	// contains filtered or unexported fields
}

func NewVVMDefaultConfig

func NewVVMDefaultConfig() VVMConfig

func (*VVMConfig) ProvideServiceChannelFactory

func (cfg *VVMConfig) ProvideServiceChannelFactory(procbus iprocbus.IProcBus) ServiceChannelFactory

type VVMIdxType

type VVMIdxType int

type VVMPortSource

type VVMPortSource struct {
	// contains filtered or unexported fields
}

type VVMPortType

type VVMPortType int

type VoedgerVM

type VoedgerVM struct {
	*VVM
	// contains filtered or unexported fields
}

func ProvideVVM

func ProvideVVM(vvmCfg *VVMConfig, vvmIdx VVMIdxType) (voedgerVM *VoedgerVM, err error)

func (*VoedgerVM) Launch

func (vvm *VoedgerVM) Launch() error

func (*VoedgerVM) Shutdown

func (vvm *VoedgerVM) Shutdown()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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