multitenant

package
v1.9.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type Legacy

type Legacy struct {
	*Stats
}

func WithLegacyPickupJobs

func WithLegacyPickupJobs(stats *Stats) *Legacy

func (*Legacy) GetRouterPickupJobs

func (*Legacy) GetRouterPickupJobs(_ string, _ int, _ time.Duration, jobQueryBatchSize int) map[string]int

type MultiTenantI

type MultiTenantI interface {
	CalculateSuccessFailureCounts(workspace, destType string, isSuccess, isDrained bool)
	GetRouterPickupJobs(destType string, noOfWorkers int, routerTimeOut time.Duration, jobQueryBatchSize int) map[string]int
	ReportProcLoopAddStats(stats map[string]map[string]int, tableType string)
	UpdateWorkspaceLatencyMap(destType, workspaceID string, val float64)
	// contains filtered or unexported methods
}

type Stats

type Stats struct {

	// have DBs also
	RouterDBs map[string]jobsdb.MultiTenantJobsDB
	// contains filtered or unexported fields
}

func NewStats

func NewStats(routerDBs map[string]jobsdb.MultiTenantJobsDB) *Stats

func (*Stats) CalculateSuccessFailureCounts

func (t *Stats) CalculateSuccessFailureCounts(workspace, destType string, isSuccess, isDrained bool)

func (*Stats) GetRouterPickupJobs

func (t *Stats) GetRouterPickupJobs(destType string, noOfWorkers int, routerTimeOut time.Duration, jobQueryBatchSize int) map[string]int

func (*Stats) ReportProcLoopAddStats

func (t *Stats) ReportProcLoopAddStats(stats map[string]map[string]int, dbPrefix string)

func (*Stats) Start

func (t *Stats) Start() error

func (*Stats) Stop

func (*Stats) Stop()

func (*Stats) UpdateWorkspaceLatencyMap

func (t *Stats) UpdateWorkspaceLatencyMap(destType, workspaceID string, val float64)

Jump to

Keyboard shortcuts

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