Skip to content

Commit

Permalink
feat: Expose PubSub config via main config entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Neurostep committed Mar 23, 2022
1 parent 166fd7e commit 5d9e4a7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/configuration/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
database "github.com/scribd/go-sdk/pkg/database"
instrumentation "github.com/scribd/go-sdk/pkg/instrumentation"
logger "github.com/scribd/go-sdk/pkg/logger"
"github.com/scribd/go-sdk/pkg/pubsub"
server "github.com/scribd/go-sdk/pkg/server"
tracking "github.com/scribd/go-sdk/pkg/tracking"
)
Expand All @@ -17,6 +18,7 @@ type Config struct {
Logger *logger.Config
Server *server.Config
Tracking *tracking.Config
PubSub *pubsub.Config
}

// NewConfig returns a new Config instance
Expand Down Expand Up @@ -53,12 +55,18 @@ func NewConfig() (*Config, error) {
return config, err
}

pubsubConfig, err := pubsub.NewConfig()
if err != nil {
return config, err
}

config.App = appConfig
config.Database = dbConfig
config.Instrumentation = instrumentationConfig
config.Logger = loggerConfig
config.Server = serverConfig
config.Tracking = trackingConfig
config.PubSub = pubsubConfig

return config, nil
}

0 comments on commit 5d9e4a7

Please sign in to comment.