Documentation
¶
Index ¶
- func Default(options ...Option) kernel.Kernel
- func New(options ...Option) kernel.Kernel
- func NewMetadataServer(_ context.Context, config cfg.Config, logger log.Logger) (kernel.Module, error)
- func NewWithInterfaces(ctx context.Context, config cfg.GosoConf, logger log.GosoLogger, ...) (kernel.Kernel, error)
- func Run(options ...Option)
- func RunBatchConsumer[M any](callback stream.BatchConsumerCallbackFactory[M], options ...Option)
- func RunBatchConsumers[M any](consumers stream.BatchConsumerCallbackMap[M], options ...Option)
- func RunConsumer[M any](callback stream.ConsumerCallbackFactory[M], options ...Option)
- func RunConsumers[M any](consumers stream.ConsumerCallbackMap[M], options ...Option)
- func RunFunc(...)
- func RunHttpDefaultServer(definer httpserver.Definer, options ...Option)
- func RunHttpServers(servers map[string]httpserver.Definer, options ...Option)
- func RunMdlSubscriber(transformers mdlsub.TransformerMapTypeVersionFactories, options ...Option)
- func RunModule(name string, moduleFactory kernel.ModuleFactory, options ...Option)
- func RunUntypedBatchConsumer(callback stream.UntypedBatchConsumerCallbackFactory, options ...Option)
- func RunUntypedBatchConsumers(consumers stream.UntypedBatchConsumerCallbackMap, options ...Option)
- func RunUntypedConsumer(callback stream.UntypedConsumerCallbackFactory, options ...Option)
- func RunUntypedConsumers(consumers stream.UntypedConsumerCallbackMap, options ...Option)
- func WithConfigDebug(app *App)
- func WithConfigFileFlag(app *App)
- func WithExecBackoffInfinite(app *App)
- func WithHttpHealthCheck(app *App)
- func WithHttpServerShares(app *App)
- func WithLoggerApplicationTag(app *App)
- func WithLoggerContextFieldsMessageEncoder(app *App)
- func WithLoggerGroupTag(app *App)
- func WithLoggerHandlersFromConfig(app *App)
- func WithLoggerMetricHandler(app *App)
- func WithMetadataServer(app *App)
- func WithMetrics(app *App)
- func WithMetricsCalculatorModule(app *App)
- func WithProducerDaemon(app *App)
- func WithProfiling(app *App)
- func WithSampling(app *App)
- func WithTaskRunner(app *App)
- func WithTracing(app *App)
- type App
- type ConfigOption
- type ErrorHandler
- type KernelOption
- type LoggerOption
- type MetadataServer
- type MetadataServerSettings
- type Option
- func WithAppCtxValue[T any](valueFactory appctx.ContextValueFactory[T]) Option
- func WithConfigBytes(bytes []byte, format string) Option
- func WithConfigCallback(call func(config cfg.GosoConf) error) Option
- func WithConfigEnvKeyPrefix(prefix string) Option
- func WithConfigEnvKeyReplacer(replacer *strings.Replacer) Option
- func WithConfigFile(filePath string, fileType string) Option
- func WithConfigFlags(args []string, opts any) Option
- func WithConfigMap(configMap map[string]any, mergeOptions ...cfg.MergeOption) Option
- func WithConfigPostProcessor(processor cfg.PostProcessor) Option
- func WithConfigSanitizers(sanitizers ...cfg.Sanitizer) Option
- func WithConfigSetting(key string, settings any) Option
- func WithExecBackoffSettings(settings *exec.BackoffSettings) Option
- func WithFixtureSetFactories(factories map[string]fixtures.FixtureSetsFactory) Option
- func WithFixtureSetFactory(group string, factory fixtures.FixtureSetsFactory) Option
- func WithFixtureSetPostProcessorFactories(factories ...fixtures.PostProcessorFactory) Option
- func WithKernelExitHandler(handler kernelPkg.ExitHandler) Option
- func WithKinsumerAutoscaleModule(kinsumerInputName string) Option
- func WithLoggerContextFieldsResolver(resolver ...log.ContextFieldsResolverFunction) Option
- func WithLoggerHandlers(handler ...log.Handler) Option
- func WithLoggerSentryHandler(contextProvider ...log.SentryContextProvider) Option
- func WithMiddlewareFactory(factory kernelPkg.MiddlewareFactory, position kernelPkg.Position) Option
- func WithModuleFactory(name string, moduleFactory kernelPkg.ModuleFactory, ...) Option
- func WithModuleMultiFactory(factory kernelPkg.ModuleMultiFactory) Option
- func WithUTCClock(useUTC bool) Option
- type SetupOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMetadataServer ¶
func NewWithInterfaces ¶
func RunBatchConsumer ¶ added in v0.50.0
func RunBatchConsumer[M any](callback stream.BatchConsumerCallbackFactory[M], options ...Option)
RunBatchConsumer runs the provided batch consumer as an application. You can pass additional options to customize the way it is executed.
func RunBatchConsumers ¶ added in v0.50.0
func RunBatchConsumers[M any](consumers stream.BatchConsumerCallbackMap[M], options ...Option)
RunBatchConsumers runs the provided batch consumers as an application. You can pass additional options to customize the way it is executed.
RunBatchConsumers requires all batch consumers to accept the same input model. Thus, it is intended to be used if you have multiple source queues you are reading from.
func RunConsumer ¶
func RunConsumer[M any](callback stream.ConsumerCallbackFactory[M], options ...Option)
RunConsumer runs the provided consumer as an application. You can pass additional options to customize the way it is executed.
func RunConsumers ¶
func RunConsumers[M any](consumers stream.ConsumerCallbackMap[M], options ...Option)
RunConsumers runs the provided consumers as an application. You can pass additional options to customize the way it is executed.
RunConsumers requires all consumers to accept the same input model. Thus, it is intended to be used if you have multiple source queues you are reading from.
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 RunUntypedBatchConsumer ¶ added in v0.50.0
func RunUntypedBatchConsumer(callback stream.UntypedBatchConsumerCallbackFactory, options ...Option)
RunUntypedBatchConsumer runs the provided untyped batch consumer as an application. You can pass additional options to customize the way it is executed.
Prefer using RunBatchConsumer if possible as it provided additional type safety (especially, if you are only expecting a single type as input anyway).
func RunUntypedBatchConsumers ¶ added in v0.50.0
func RunUntypedBatchConsumers(consumers stream.UntypedBatchConsumerCallbackMap, options ...Option)
RunUntypedBatchConsumers runs the provided untyped batch consumers as an application. You can pass additional options to customize the way it is executed.
Prefer using RunBatchConsumers if all batch consumers share the same input type or use stream.EraseBatchConsumerCallbackFactoryTypes to convert typed batch consumers to untyped batch consumers. If you are running distinct batch consumers in the same application, it might be a good idea to split the application into multiple applications if possible.
func RunUntypedConsumer ¶ added in v0.41.0
func RunUntypedConsumer(callback stream.UntypedConsumerCallbackFactory, options ...Option)
RunUntypedConsumer runs the provided untyped consumer as an application. You can pass additional options to customize the way it is executed.
Prefer using RunConsumer if possible as it provided additional type safety (especially, if you are only expecting a single type as input anyway).
func RunUntypedConsumers ¶ added in v0.41.0
func RunUntypedConsumers(consumers stream.UntypedConsumerCallbackMap, options ...Option)
RunUntypedConsumers runs the provided untyped consumers as an application. You can pass additional options to customize the way it is executed.
Prefer using RunConsumers if all consumers share the same input type or use stream.EraseConsumerCallbackFactoryTypes to convert typed consumers to untyped consumers. If you are running distinct consumers in the same application, it might be a good idea to split the application into multiple applications if possible.
func WithConfigDebug ¶ added in v0.26.0
func WithConfigDebug(app *App)
func WithConfigFileFlag ¶
func WithConfigFileFlag(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 WithSampling ¶ added in v0.54.4
func WithSampling(app *App)
func WithTaskRunner ¶ added in v0.19.0
func WithTaskRunner(app *App)
func WithTracing ¶
func WithTracing(app *App)
Types ¶
type ConfigOption ¶
type LoggerOption ¶
type LoggerOption func(config cfg.GosoConf, logger log.GosoLogger) error
type MetadataServer ¶
type MetadataServer struct {
kernel.EssentialBackgroundModule
kernel.EssentialStage
// contains filtered or unexported fields
}
type MetadataServerSettings ¶
type MetadataServerSettings struct {
Port int `cfg:"port" default:"8070"`
}
type Option ¶
type Option func(app *App)
func WithAppCtxValue ¶ added in v0.49.1
func WithAppCtxValue[T any](valueFactory appctx.ContextValueFactory[T]) Option
func WithConfigBytes ¶ added in v0.36.1
func WithConfigCallback ¶ added in v0.26.2
func WithConfigEnvKeyPrefix ¶
func WithConfigFile ¶
func WithConfigFlags ¶ added in v0.36.1
func WithConfigMap ¶
func WithConfigMap(configMap map[string]any, mergeOptions ...cfg.MergeOption) Option
func WithConfigPostProcessor ¶
func WithConfigPostProcessor(processor cfg.PostProcessor) Option
func WithConfigSanitizers ¶
func WithConfigSetting ¶
func WithExecBackoffSettings ¶
func WithExecBackoffSettings(settings *exec.BackoffSettings) Option
func WithFixtureSetFactories ¶ added in v0.36.0
func WithFixtureSetFactories(factories map[string]fixtures.FixtureSetsFactory) Option
func WithFixtureSetFactory ¶ added in v0.24.0
func WithFixtureSetFactory(group string, factory fixtures.FixtureSetsFactory) Option
func WithFixtureSetPostProcessorFactories ¶ added in v0.37.0
func WithFixtureSetPostProcessorFactories(factories ...fixtures.PostProcessorFactory) Option
func WithKernelExitHandler ¶
func WithKernelExitHandler(handler kernelPkg.ExitHandler) Option
func WithKinsumerAutoscaleModule ¶ added in v0.34.1
func WithLoggerContextFieldsResolver ¶
func WithLoggerContextFieldsResolver(resolver ...log.ContextFieldsResolverFunction) Option
func WithLoggerHandlers ¶
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