multitenant

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NOOP = &noop{}

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, _ float64) (map[string]int, map[string]float64)

type MultiTenantI

type MultiTenantI interface {
	CalculateSuccessFailureCounts(workspace, destType string, isSuccess, isDrained bool)
	GetRouterPickupJobs(destType string, noOfWorkers int, routerTimeOut time.Duration, jobQueryBatchSize int, timeGained float64) (map[string]int, map[string]float64)
	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, timeGained float64) (map[string]int, map[string]float64)

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