Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder interface {
// Build initializes existing hook modules passing them config and other dependencies.
// It returns hook repository created based on the implemented hook interfaces by modules
// and a map of modules to a list of stage names for which module provides hooks
// or an error encountered during module initialization.
Build(cfg config.Modules, client moduledeps.ModuleDeps) (hooks.HookRepository, map[string][]string, *ShutdownModules, error)
}
Builder is the interfaces intended for building modules implementing hook interfaces github.com/prebid/prebid-server/hooks/hookstage.
type ModuleBuilderFn ¶
type ModuleBuilderFn func(cfg json.RawMessage, deps moduledeps.ModuleDeps) (interface{}, error)
ModuleBuilderFn returns an interface{} type that implements certain hook interfaces.
type ModuleBuilders ¶
type ModuleBuilders map[string]map[string]ModuleBuilderFn
ModuleBuilders mapping between module name and its builder: map[vendor]map[module]ModuleBuilderFn
type ShutdownModules ¶ added in v3.20.0
type ShutdownModules struct {
// contains filtered or unexported fields
}
ShutdownModules is a struct that holds a slice of Shutdowner modules.
func NewShutdownModules ¶ added in v3.20.0
func NewShutdownModules(modules map[string]interface{}) *ShutdownModules
NewShutdownModules creates a new ShutdownModules instance from a map of modules. It filters the modules to include only those that implement the Shutdowner interface.
func (*ShutdownModules) Shutdown ¶ added in v3.20.0
func (s *ShutdownModules) Shutdown()
Shutdown iterates over all modules and calls their Shutdown method.
type Shutdowner ¶ added in v3.20.0
type Shutdowner interface {
Shutdown() error
}
Shutdowner is an interface that defines a method for shutting down modules.