Skip to content

Commit

Permalink
remove vestigial nats stream
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeschuurmans committed Aug 27, 2024
1 parent 01aaf52 commit 87b7154
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
7 changes: 0 additions & 7 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/metal-toolbox/flipflop/internal/model"
"github.com/metal-toolbox/flipflop/internal/store"
"github.com/metal-toolbox/flipflop/internal/version"
"github.com/metal-toolbox/rivets/events"
"github.com/pkg/errors"
"github.com/spf13/cobra"

Expand Down Expand Up @@ -78,13 +77,7 @@ func runWorker(ctx context.Context) {
theApp.Logger.Fatal(err)
}

stream, err := events.NewStream(theApp.Config.Endpoints.Nats)
if err != nil {
theApp.Logger.Fatal(err)
}

ff := flipflop.New(
stream,
inv,
theApp.Logger,
theApp.Config,
Expand Down
5 changes: 0 additions & 5 deletions internal/flipflop/flipflop.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/metal-toolbox/flipflop/internal/store"
"github.com/metal-toolbox/flipflop/internal/version"
rctypes "github.com/metal-toolbox/rivets/condition"
"github.com/metal-toolbox/rivets/events"
"github.com/sirupsen/logrus"
"go.opentelemetry.io/otel"
)
Expand All @@ -23,7 +22,6 @@ const (
type flipflop struct {
logger *logrus.Logger
cfg *app.Configuration
stream events.Stream
store store.Repository
name string
}
Expand All @@ -32,7 +30,6 @@ type flipflop struct {
//
// nolint:revive // unexported type is not annoying to use
func New(
stream events.Stream,
repository store.Repository,
logger *logrus.Logger,
cfg *app.Configuration,
Expand All @@ -41,7 +38,6 @@ func New(

return &flipflop{
name: name,
stream: stream,
store: repository,
cfg: cfg,
logger: logger,
Expand Down Expand Up @@ -91,7 +87,6 @@ func (f *flipflop) Run(ctx context.Context) {
logger: loggerEntry,
controllerID: nc.ID(),
store: f.store,
stream: f.stream,
}
}

Expand Down
2 changes: 0 additions & 2 deletions internal/flipflop/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/metal-toolbox/flipflop/internal/model"
"github.com/metal-toolbox/flipflop/internal/store"
rctypes "github.com/metal-toolbox/rivets/condition"
"github.com/metal-toolbox/rivets/events"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/sirupsen/logrus"
Expand All @@ -24,7 +23,6 @@ type ConditionTaskHandler struct {
logger *logrus.Entry
cfg *app.Configuration
bmc device.Queryor
stream events.Stream
store store.Repository
publisher ctrl.Publisher
server *model.Asset
Expand Down

0 comments on commit 87b7154

Please sign in to comment.