Skip to content

Commit

Permalink
[dbevents-buffersize] adding EventConfig for firefly_config generator
Browse files Browse the repository at this point in the history
Signed-off-by: David Echelberger <[email protected]>
  • Loading branch information
David Echelberger committed Jan 5, 2022
1 parent 96d9846 commit 913e989
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions internal/core/firefly_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ type TokenConnector struct {

type TokensConfig []*TokenConnector

type DBEventsConfig struct {
BufferSize int `yaml:"bufferSize,omitempty"`
}

type EventConfig struct {
DBEvents *DBEventsConfig `yaml:"dbevents,omitempty"`
}

type FireflyConfig struct {
Log *LogConfig `yaml:"log,omitempty"`
Debug *HttpServerConfig `yaml:"debug,omitempty"`
Expand All @@ -153,6 +161,7 @@ type FireflyConfig struct {
P2PFS *PublicStorageConfig `yaml:"publicstorage,omitempty"`
DataExchange *DataExchangeConfig `yaml:"dataexchange,omitempty"`
Tokens *TokensConfig `yaml:"tokens,omitempty"`
Event *EventConfig `yaml:"event,omitempty"`
}

func NewFireflyConfig(stack *types.Stack, member *types.Member) *FireflyConfig {
Expand Down Expand Up @@ -199,6 +208,11 @@ func NewFireflyConfig(stack *types.Stack, member *types.Member) *FireflyConfig {
URL: getDataExchangeURL(member),
},
},
Event: &EventConfig{
DBEvents: &DBEventsConfig{
BufferSize: 10000,
},
},
}

if stack.PrometheusEnabled {
Expand Down

0 comments on commit 913e989

Please sign in to comment.