Documentation
¶
Overview ¶
internal/evolution/bus/bus.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EvolutionBus ¶
type EvolutionBus struct {
// contains filtered or unexported fields
}
EvolutionBus manages the flow of information using a Pub/Sub model for the OODA loop.
func NewEvolutionBus ¶
func NewEvolutionBus(logger *zap.Logger, bufferSize int) *EvolutionBus
NewEvolutionBus initializes the EvolutionBus.
func (*EvolutionBus) Acknowledge ¶
func (eb *EvolutionBus) Acknowledge(msg Message)
Acknowledge signals that a message has been processed by a consumer.
func (*EvolutionBus) Post ¶
func (eb *EvolutionBus) Post(ctx context.Context, msgType models.MessageType, payload interface{}) error
Post sends a message onto the bus. Blocks if subscriber buffers are full.
func (*EvolutionBus) Shutdown ¶
func (eb *EvolutionBus) Shutdown()
Shutdown gracefully closes the bus.
func (*EvolutionBus) Subscribe ¶
func (eb *EvolutionBus) Subscribe(msgTypes ...models.MessageType) (<-chan Message, func())
Subscribe returns a channel to listen for specific message types.
Click to show internal directories.
Click to hide internal directories.