apphandlers

package
v0.0.0-...-0ade494 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ReadTimeout       time.Duration
	ReadHeaderTimeout time.Duration
	WriteTimeout      time.Duration
	IdleTimeout       time.Duration

	MaxHeaderBytes int
)
View Source
var (
	Diagnostics diagnostics.DiagnosticsI
)

Functions

func Init

func Init()

func Init2

func Init2()

func NewRsourcesService

func NewRsourcesService(deploymentType deployment.Type) (rsources.JobService, error)

NewRsourcesService produces a rsources.JobService through environment configuration (env variables & config file)

func StartProcessor

func StartProcessor(
	ctx context.Context, clearDB *bool, gatewayDB, routerDB, batchRouterDB,
	procErrorDB *jobsdb.HandleT, reporting types.ReportingI, multitenantStat multitenant.MultiTenantI,
	transientSources transientsource.Service, rsourcesService rsources.JobService,
) error

StartProcessor atomically starts processor process if not already started

func StartRouter

func StartRouter(
	ctx context.Context, routerDB jobsdb.MultiTenantJobsDB, batchRouterDB *jobsdb.HandleT,
	procErrorDB *jobsdb.HandleT, reporting types.ReportingI, multitenantStat multitenant.MultiTenantI,
	transientSources transientsource.Service, rsourcesService rsources.JobService,
)

StartRouter atomically starts router process if not already started

Types

type AppHandler

type AppHandler interface {
	GetAppType() string
	HandleRecovery(*app.Options)
	StartRudderCore(context.Context, *app.Options) error
}

AppHandler to be implemented by different app type objects.

func GetAppHandler

func GetAppHandler(application app.Interface, appType string, versionHandler func(w http.ResponseWriter, r *http.Request)) AppHandler

type EmbeddedApp

type EmbeddedApp struct {
	App            app.Interface
	VersionHandler func(w http.ResponseWriter, r *http.Request)
}

EmbeddedApp is the type for embedded type implementation

func (*EmbeddedApp) GetAppType

func (*EmbeddedApp) GetAppType() string

func (*EmbeddedApp) HandleRecovery

func (*EmbeddedApp) HandleRecovery(options *app.Options)

func (*EmbeddedApp) StartRudderCore

func (embedded *EmbeddedApp) StartRudderCore(ctx context.Context, options *app.Options) error

type GatewayApp

type GatewayApp struct {
	App            app.Interface
	VersionHandler func(w http.ResponseWriter, r *http.Request)
}

GatewayApp is the type for Gateway type implementation

func (*GatewayApp) GetAppType

func (*GatewayApp) GetAppType() string

func (*GatewayApp) HandleRecovery

func (*GatewayApp) HandleRecovery(options *app.Options)

func (*GatewayApp) StartRudderCore

func (gatewayApp *GatewayApp) StartRudderCore(ctx context.Context, options *app.Options) error

type ProcessorApp

type ProcessorApp struct {
	App            app.Interface
	VersionHandler func(w http.ResponseWriter, r *http.Request)
}

ProcessorApp is the type for Processor type implemention

func (*ProcessorApp) GetAppType

func (processor *ProcessorApp) GetAppType() string

func (*ProcessorApp) HandleRecovery

func (processor *ProcessorApp) HandleRecovery(options *app.Options)

func (*ProcessorApp) StartRudderCore

func (processor *ProcessorApp) StartRudderCore(ctx context.Context, options *app.Options) error

Jump to

Keyboard shortcuts

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