Skip to content

Commit

Permalink
Cleanup dead code
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Auerbeck <[email protected]>
  • Loading branch information
tylerauerbeck committed Aug 23, 2023
1 parent ab57312 commit c295d7f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 33 deletions.
24 changes: 6 additions & 18 deletions cmd/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,13 @@ func process(ctx context.Context, logger *zap.SugaredLogger) error {
logger.Fatalw("failed to initialize events", "error", err)
}

// subscriber, err := pubsub.NewSubscriber(ctx, events, engine,
// pubsub.WithLogger(logger),
// )
// if err != nil {
// logger.Fatalw("unable to initialize subscriber", "error", err)
// }

server := &server.Server{
Context: cx,
Debug: viper.GetBool("logging.debug"),
Echo: eSrv,
Locations: viper.GetStringSlice("event-locations"),
Logger: logger,
// SubscriberConfig: config.AppConfig.Events.Subscriber,
// Subscriber: subscriber,
Context: cx,
Debug: viper.GetBool("logging.debug"),
Echo: eSrv,
Locations: viper.GetStringSlice("event-locations"),
Logger: logger,
Connection: conn,
ChangeTopics: viper.GetStringSlice("change-topics"),
IPBlock: viper.GetString("ipblock"),
}
Expand All @@ -117,10 +109,6 @@ func process(ctx context.Context, logger *zap.SugaredLogger) error {
server.IPAMClient = ipamclient.NewClient((viper.GetString("ipam-endpoint")))
}

server.Connection = conn

// server.Publisher = pub

if err := server.Run(cx); err != nil {
logger.Fatalw("failed starting server", "error", err)
cancel()
Expand Down
5 changes: 0 additions & 5 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ var AppConfig struct {
OIDC OIDCClientConfig
}

// EventsConfig stores the configuration for a load-balancer-api events config
// type EventsConfig struct {
// events.Config `mapstructure:",squash"`
// }

// OIDCClientConfig stores the configuration for an OIDC client
type OIDCClientConfig struct {
Client oauth2x.Config
Expand Down
19 changes: 9 additions & 10 deletions internal/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@ import (

// Server holds options for server connectivity and settings
type Server struct {
APIClient *lbapi.Client
IPAMClient *ipamclient.Client
Context context.Context
Debug bool
Echo *echox.Server
IPBlock string
Locations []string
Logger *zap.SugaredLogger
Publisher *events.Publisher
// SubscriberConfig events.SubscriberConfig
APIClient *lbapi.Client
IPAMClient *ipamclient.Client
Context context.Context
Debug bool
Echo *echox.Server
IPBlock string
Locations []string
Logger *zap.SugaredLogger
Publisher *events.Publisher
Connection events.Connection
ChangeTopics []string

Expand Down

0 comments on commit c295d7f

Please sign in to comment.