diff --git a/cmd/stanza/offsets.go b/cmd/stanza/offsets.go index 1dc6fcec1..c80a6589b 100644 --- a/cmd/stanza/offsets.go +++ b/cmd/stanza/offsets.go @@ -5,7 +5,7 @@ import ( "io" "os" - "github.com/observiq/stanza/operator" + "github.com/observiq/stanza/database" "github.com/observiq/stanza/operator/helper" "github.com/spf13/cobra" "go.etcd.io/bbolt" @@ -39,7 +39,7 @@ func NewOffsetsClearCmd(rootFlags *RootFlags) *cobra.Command { Short: "Clear persisted offsets from the database", Args: cobra.ArbitraryArgs, Run: func(command *cobra.Command, args []string) { - db, err := operator.OpenDatabase(rootFlags.DatabaseFile) + db, err := database.OpenDatabase(rootFlags.DatabaseFile) exitOnErr("Failed to open database", err) defer db.Close() defer db.Sync() @@ -90,7 +90,7 @@ func NewOffsetsListCmd(rootFlags *RootFlags) *cobra.Command { Short: "List operators with persisted offsets", Args: cobra.NoArgs, Run: func(command *cobra.Command, args []string) { - db, err := operator.OpenDatabase(rootFlags.DatabaseFile) + db, err := database.OpenDatabase(rootFlags.DatabaseFile) exitOnErr("Failed to open database", err) defer db.Close() diff --git a/cmd/stanza/offsets_test.go b/cmd/stanza/offsets_test.go index 86e344e0e..029257c34 100644 --- a/cmd/stanza/offsets_test.go +++ b/cmd/stanza/offsets_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "testing" - agent "github.com/observiq/stanza/agent" + "github.com/observiq/stanza/database" "github.com/observiq/stanza/operator/helper" "github.com/stretchr/testify/require" "go.etcd.io/bbolt" @@ -27,7 +27,7 @@ func TestOffsets(t *testing.T) { stdout = buf // add an offset to the database - db, err := agent.OpenDatabase(databasePath) + db, err := database.OpenDatabase(databasePath) require.NoError(t, err) db.Update(func(tx *bbolt.Tx) error { bucket, err := tx.CreateBucketIfNotExists(helper.OffsetsBucket)