Skip to content

Commit 4923608

Browse files
committed
fix(eventbus): align async core config and lifecycle guards
1 parent a783f3c commit 4923608

4 files changed

Lines changed: 3 additions & 4 deletions

File tree

pkg/config/app/admin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func (c AdminConfig) PostProcess() error {
120120
)
121121
}
122122

123-
func (c AdminConfig) Validate() error {
123+
func (c *AdminConfig) Validate() error {
124124
if c.Log == nil {
125125
c.Log = log.DefaultLogConfig()
126126
} else if err := c.Log.Validate(); err != nil {

pkg/config/eventbus/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ func (c Config) Validate() error {
2929

3030
func Default() Config {
3131
return Config{
32-
BufferSize: 100,
32+
BufferSize: 1024,
3333
}
3434
}

pkg/core/events/async.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ package events
1919

2020
import "sync/atomic"
2121

22-
// AsyncSubscriber is an optional interface.
23-
// Subscribers implementing this interface can be dispatched asynchronously.
2422
type AsyncSubscriber interface {
2523
Subscriber
2624
AsyncEnabled() bool

pkg/core/events/component.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ type EventBusComponent interface {
3939
}
4040

4141
var _ EventBusComponent = &eventBus{}
42+
var _ runtime.GracefulComponent = &eventBus{}
4243

4344
type eventBus struct {
4445
rwMutex sync.RWMutex

0 commit comments

Comments
 (0)