application

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 29 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default(options ...Option) kernel.Kernel

func New

func New(options ...Option) kernel.Kernel

func NewMetadataServer

func NewMetadataServer(_ context.Context, config cfg.Config, logger log.Logger) (kernel.Module, error)

func NewWithInterfaces

func NewWithInterfaces(ctx context.Context, config cfg.GosoConf, logger log.GosoLogger, options ...Option) (kernel.Kernel, error)

func Run

func Run(options ...Option)

func RunConsumer

func RunConsumer(callback stream.ConsumerCallbackFactory, options ...Option)

func RunConsumers

func RunConsumers(consumers stream.ConsumerCallbackMap, options ...Option)

func RunFunc

func RunFunc(f func(ctx context.Context, config cfg.Config, logger log.Logger) (kernel.ModuleRunFunc, error), options ...Option)

func RunHttpDefaultServer added in v0.15.0

func RunHttpDefaultServer(definer httpserver.Definer, options ...Option)

func RunHttpServers added in v0.15.0

func RunHttpServers(servers map[string]httpserver.Definer, options ...Option)

func RunMdlSubscriber

func RunMdlSubscriber(transformers mdlsub.TransformerMapTypeVersionFactories, options ...Option)

func RunModule

func RunModule(name string, moduleFactory kernel.ModuleFactory, options ...Option)

func WithConfigDebug added in v0.26.0

func WithConfigDebug(app *App)

func WithConfigFileFlag

func WithConfigFileFlag(app *App)

func WithDbRepoChangeHistory

func WithDbRepoChangeHistory(app *App)

func WithExecBackoffInfinite

func WithExecBackoffInfinite(app *App)

func WithHttpHealthCheck added in v0.15.0

func WithHttpHealthCheck(app *App)

func WithHttpServerShares added in v0.15.0

func WithHttpServerShares(app *App)

func WithLoggerApplicationTag

func WithLoggerApplicationTag(app *App)

func WithLoggerContextFieldsMessageEncoder

func WithLoggerContextFieldsMessageEncoder(app *App)

func WithLoggerGroupTag

func WithLoggerGroupTag(app *App)

func WithLoggerHandlersFromConfig

func WithLoggerHandlersFromConfig(app *App)

func WithLoggerMetricHandler

func WithLoggerMetricHandler(app *App)

func WithMetadataServer

func WithMetadataServer(app *App)

func WithMetrics

func WithMetrics(app *App)

func WithMetricsCalculatorModule added in v0.22.0

func WithMetricsCalculatorModule(app *App)

func WithProducerDaemon

func WithProducerDaemon(app *App)

func WithProfiling

func WithProfiling(app *App)

func WithTaskRunner added in v0.19.0

func WithTaskRunner(app *App)

func WithTracing

func WithTracing(app *App)

Types

type App

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

type ConfigOption

type ConfigOption func(config cfg.GosoConf) error

type ErrorHandler

type ErrorHandler func(msg string, args ...interface{})

type KernelOption

type KernelOption func(config cfg.GosoConf) kernelPkg.Option

type LoggerOption

type LoggerOption func(config cfg.GosoConf, logger log.GosoLogger) error

type MetadataServer

type MetadataServer struct {
	kernel.BackgroundModule
	kernel.ServiceStage
	// contains filtered or unexported fields
}

func (*MetadataServer) Run

func (s *MetadataServer) Run(ctx context.Context) error

type MetadataServerSettings

type MetadataServerSettings struct {
	Port int `cfg:"port" default:"8070"`
}

type Option

type Option func(app *App)

func WithConfigCallback added in v0.26.2

func WithConfigCallback(call func(config cfg.GosoConf) error) Option

func WithConfigEnvKeyPrefix

func WithConfigEnvKeyPrefix(prefix string) Option

func WithConfigEnvKeyReplacer

func WithConfigEnvKeyReplacer(replacer *strings.Replacer) Option

func WithConfigErrorHandlers

func WithConfigErrorHandlers(handlers ...cfg.ErrorHandler) Option

func WithConfigFile

func WithConfigFile(filePath string, fileType string) Option

func WithConfigMap

func WithConfigMap(configMap map[string]any, mergeOptions ...cfg.MergeOption) Option

func WithConfigPostProcessor

func WithConfigPostProcessor(processor cfg.PostProcessor) Option

func WithConfigSanitizers

func WithConfigSanitizers(sanitizers ...cfg.Sanitizer) Option

func WithConfigSetting

func WithConfigSetting(key string, settings any) Option

func WithExecBackoffSettings

func WithExecBackoffSettings(settings *exec.BackoffSettings) Option

func WithFixtureSetFactory added in v0.24.0

func WithFixtureSetFactory(group string, factory fixtures.FixtureSetsFactory) Option

func WithKernelExitHandler

func WithKernelExitHandler(handler kernelPkg.ExitHandler) Option

func WithLoggerContextFieldsResolver

func WithLoggerContextFieldsResolver(resolver ...log.ContextFieldsResolverFunction) Option

func WithLoggerHandlers

func WithLoggerHandlers(handler ...log.Handler) Option

func WithLoggerSentryHandler

func WithLoggerSentryHandler(contextProvider ...log.SentryContextProvider) Option

func WithMiddlewareFactory

func WithMiddlewareFactory(factory kernelPkg.MiddlewareFactory, position kernelPkg.Position) Option

func WithModuleFactory

func WithModuleFactory(name string, moduleFactory kernelPkg.ModuleFactory, opts ...kernelPkg.ModuleOption) Option

func WithModuleMultiFactory

func WithModuleMultiFactory(factory kernelPkg.ModuleMultiFactory) Option

func WithUTCClock

func WithUTCClock(useUTC bool) Option

type SetupOption

type SetupOption func(config cfg.GosoConf, logger log.GosoLogger) error

Jump to

Keyboard shortcuts

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