application

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MIT Imports: 27 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() kernel.ModuleFactory

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 WithConfigFileFlag

func WithConfigFileFlag(app *App)

func WithConsumerMessagesPerRunnerMetrics

func WithConsumerMessagesPerRunnerMetrics(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 WithProducerDaemon

func WithProducerDaemon(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 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]interface{}, 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 interface{}) Option

func WithExecBackoffSettings

func WithExecBackoffSettings(settings *exec.BackoffSettings) Option

func WithFixtureBuilderFactory

func WithFixtureBuilderFactory(factory fixtures.FixtureBuilderFactory) 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 WithProfiling

func WithProfiling() 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