Documentation
¶
Index ¶
Constants ¶
View Source
const ( ComponentName = "inject" ConfigPort = "config" MessagePort = "message" OutputPort = "output" ErrorPort = "error" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component implements config injection
func (*Component) GetInfo ¶
func (c *Component) GetInfo() module.ComponentInfo
type Config ¶
type Config struct {
Data any `json:"data" configurable:"true" required:"true" title:"Data" description:"Configuration data to inject into messages"`
}
Config is stored and injected into messages
type Error ¶
type Error struct {
Context any `json:"context,omitempty" title:"Context"`
Error string `json:"error" title:"Error"`
Message Message `json:"message" title:"Message"`
}
Error output
type Message ¶
type Message struct {
Context any `json:"context,omitempty" configurable:"true" title:"Context" description:"Passthrough context for correlation"`
Data any `json:"data,omitempty" configurable:"true" title:"Data" description:"Message data"`
}
Message passes through with config injected
type Output ¶
type Output struct {
Context any `json:"context,omitempty" title:"Context"`
Data any `json:"data,omitempty" title:"Data" description:"Original message data"`
Config any `json:"config,omitempty" title:"Config" description:"Injected configuration"`
}
Output contains original message plus injected config
Click to show internal directories.
Click to hide internal directories.