Skip to content

Commit

Permalink
remove unexported type from migrator.New
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Jan 10, 2025
1 parent 09513c1 commit 51a18d2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/remove_unexported_type_from_migratornew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
default: patch
---

# Remove unexported type from migrator.New
7 changes: 4 additions & 3 deletions autopilot/migrator/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ type (
}
)

func New(ctx context.Context, masterKey utils.MasterKey, alerts alerts.Alerter, ss SlabStore, b Bus, healthCutoff float64, numThreads, downloadMaxOverdrive, uploadMaxOverdrive uint64, downloadOverdriveTimeout, uploadOverdriveTimeout, accountsRefillInterval time.Duration, logger *zap.Logger) (*Migrator, error) {
func New(ctx context.Context, masterKey [32]byte, alerts alerts.Alerter, ss SlabStore, b Bus, healthCutoff float64, numThreads, downloadMaxOverdrive, uploadMaxOverdrive uint64, downloadOverdriveTimeout, uploadOverdriveTimeout, accountsRefillInterval time.Duration, logger *zap.Logger) (*Migrator, error) {
logger = logger.Named("migrator")
m := &Migrator{
alerts: alerts,
Expand All @@ -125,8 +125,9 @@ func New(ctx context.Context, masterKey utils.MasterKey, alerts alerts.Alerter,
}

// derive keys
ak := masterKey.DeriveAccountsKey("migrator")
uk := masterKey.DeriveUploadKey()
mk := utils.MasterKey(masterKey)
ak := mk.DeriveAccountsKey("migrator")
uk := mk.DeriveUploadKey()

// create account manager
am, err := accounts.NewManager(ak, "migrator", alerts, m, m, b, b, b, b, accountsRefillInterval, logger)
Expand Down

0 comments on commit 51a18d2

Please sign in to comment.