app

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: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GATEWAY   = "GATEWAY"
	PROCESSOR = "PROCESSOR"
	EMBEDDED  = "EMBEDDED"
)

Variables

This section is empty.

Functions

func Init

func Init()

func LivenessHandler

func LivenessHandler(jobsDB jobsdb.JobsDB) http.HandlerFunc

LivenessHandler is the http handler for the Kubernetes liveness probe

Types

type App

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

App holds the main application's configuration and state

func (*App) Features

func (a *App) Features() *Features

Features returns this application's enterprise features

func (*App) Options

func (a *App) Options() *Options

Options returns this application's options

func (*App) Setup

func (a *App) Setup()

Setup initializes application

func (*App) Stop

func (a *App) Stop()

Stop stops application

type ConfigEnvFeature

type ConfigEnvFeature interface {
	Setup() types.ConfigEnvI
}

ConfigEnvFeature handles override of config from ENV variables.

type Features

type Features struct {
	Migrator     MigratorFeature
	SuppressUser SuppressUserFeature
	ConfigEnv    ConfigEnvFeature
	Reporting    ReportingFeature
	Replay       ReplayFeature
}

Features contains optional implementations of Enterprise only features.

type Interface

type Interface interface {
	Setup()              // Initializes application
	Stop()               // Stop application
	Options() *Options   // Get this application's options
	Features() *Features // Get this application's enterprise features
}

Interface of a rudder-server application

func New

func New(options *Options) Interface

New creates a new application instance

type MigratorFeature

type MigratorFeature interface {
	Run(context.Context, *jobsdb.HandleT, *jobsdb.HandleT, *jobsdb.HandleT, func(), func())
	PrepareJobsdbsForImport(*jobsdb.HandleT, *jobsdb.HandleT, *jobsdb.HandleT)
}

MigratorFeature handles migration of nodes during cluster's scale up/down.

type MigratorFeatureSetup

type MigratorFeatureSetup func(Interface) MigratorFeature

MigratorFeatureSetup is a function that initializes a Migrator feature, based on application instance

type Options

type Options struct {
	NormalMode      bool
	DegradedMode    bool
	MigrationMode   string
	ClearDB         bool
	Cpuprofile      string
	Memprofile      string
	VersionFlag     bool
	EnterpriseToken string
}

Options contains application's initialisation options

func LoadOptions

func LoadOptions() *Options

LoadOptions loads application's initialisation options based on command line flags and environment

type ReplayFeature

type ReplayFeature interface {
	Setup(ctx context.Context, replayDB, gwDB, routerDB, batchRouterDB *jobsdb.HandleT)
}

ReplayFeature handles inserting of failed jobs into respective gw/rt jobsdb

type ReplayFeatureSetup

type ReplayFeatureSetup func(Interface) ReplayFeature

ReplayFeatureSetup is a function that initializes a Replay feature

type ReportingFeature

type ReportingFeature interface {
	Setup(backendConfig backendconfig.BackendConfig) types.ReportingI
	GetReportingInstance() types.ReportingI
}

ReportingFeature handles reporting statuses / errors to reporting service

type SuppressUserFeature

type SuppressUserFeature interface {
	Setup(backendConfig backendconfig.BackendConfig) (types.SuppressUserI, error)
}

SuppressUserFeature handles webhook event requests

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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