Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 0 additions & 79 deletions clients/qms.go

This file was deleted.

7 changes: 0 additions & 7 deletions internal/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ type App struct {
amqpClient *amqp.AMQP
natsClient *nats.EncodedConn
amqpUsageRoutingKey string
qmsClient *clients.QMSAPI
qmsEnabled bool
subscriptionsBaseURI string
}
Expand All @@ -40,7 +39,6 @@ type AppConfiguration struct {
NATSClient *nats.EncodedConn
AMQPUsageRoutingKey string
QMSEnabled bool
QMSBaseURL string
SubscriptionsBaseURI string
}

Expand All @@ -63,10 +61,6 @@ func New(db *sqlx.DB, config *AppConfiguration) (*App, error) {
if err != nil {
return nil, errors.Wrap(err, "unable to create the data-usage-api client")
}
qmsClient, err := clients.QMSAPIClient(config.QMSBaseURL)
if err != nil {
return nil, errors.Wrap(err, "unable to create the QMS client")
}

// Create the app instance.
app := &App{
Expand All @@ -77,7 +71,6 @@ func New(db *sqlx.DB, config *AppConfiguration) (*App, error) {
amqpClient: config.AMQPClient,
natsClient: config.NATSClient,
amqpUsageRoutingKey: config.AMQPUsageRoutingKey,
qmsClient: qmsClient,
qmsEnabled: config.QMSEnabled,
subscriptionsBaseURI: config.SubscriptionsBaseURI,
}
Expand Down
8 changes: 0 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

logging.SetupLogging(*logLevel)

nats.RegisterEncoder("protojson", protobufjson.NewCodec(protobufjson.WithEmitUnpopulated()))

Check failure on line 88 in main.go

View workflow job for this annotation

GitHub Actions / call-workflow-passing-data / lint

SA1019: nats.RegisterEncoder is deprecated: Encoded connections are no longer supported. (staticcheck)

log.Infof("config path is %s", *configPath)
log.Infof("listen port is %d", listenPort)
Expand Down Expand Up @@ -133,13 +133,6 @@
}

qmsEnabled := config.Bool("qms.enabled")
qmsBaseURL := config.String("qms.base")

if qmsEnabled {
if qmsBaseURL == "" {
log.Fatal("qms.base must be set in the configuration file if qms.enabled is true")
}
}

natsCluster := config.String("nats.cluster")
if natsCluster == "" {
Expand Down Expand Up @@ -188,7 +181,7 @@
log.Infof("configured servers: %s", strings.Join(nc.Servers(), " "))
log.Infof("connected to NATS host: %s", nc.ConnectedServerName())

natsClient, err := nats.NewEncodedConn(nc, "protojson")

Check failure on line 184 in main.go

View workflow job for this annotation

GitHub Actions / call-workflow-passing-data / lint

SA1019: nats.NewEncodedConn is deprecated: Encoded connections are no longer supported. (staticcheck)
if err != nil {
log.Fatal(err)
}
Expand Down Expand Up @@ -224,7 +217,6 @@
NATSClient: natsClient,
AMQPUsageRoutingKey: *usageRoutingKey,
QMSEnabled: qmsEnabled,
QMSBaseURL: qmsBaseURL,
SubscriptionsBaseURI: *subscriptionsBase,
}

Expand Down
Loading