Skip to content

Commit

Permalink
added helper functions for programmatic use
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Feb 10, 2024
1 parent 9d15fc4 commit 5ad74d1
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions pkg/coordinator/scheduler/services.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package scheduler

import (
"github.com/ethpandaops/assertoor/pkg/coordinator/clients"
"github.com/ethpandaops/assertoor/pkg/coordinator/names"
"github.com/ethpandaops/assertoor/pkg/coordinator/types"
"github.com/ethpandaops/assertoor/pkg/coordinator/wallet"
)

type servicesProvider struct {
clientPool *clients.ClientPool
walletManager *wallet.Manager
validatorNames *names.ValidatorNames
}

func NewServicesProvider(clientPool *clients.ClientPool, walletManager *wallet.Manager, validatorNames *names.ValidatorNames) types.TaskServices {
return &servicesProvider{
clientPool: clientPool,
walletManager: walletManager,
validatorNames: validatorNames,
}
}

func (p *servicesProvider) ClientPool() *clients.ClientPool {
return p.clientPool
}

func (p *servicesProvider) WalletManager() *wallet.Manager {
return p.walletManager
}

func (p *servicesProvider) ValidatorNames() *names.ValidatorNames {
return p.validatorNames
}

0 comments on commit 5ad74d1

Please sign in to comment.