func WithName(name string) Parameter {
	return parameterFunc(func(p *parameters) {
		p.name = name
	})
}
WithName sets the name for the server.
package grpc
import (
	"github.com/attestantio/dirk/services/accountmanager"
	"github.com/attestantio/dirk/services/lister"
	"github.com/attestantio/dirk/services/metrics"
	"github.com/attestantio/dirk/services/peers"
	"github.com/attestantio/dirk/services/process"
	"github.com/attestantio/dirk/services/signer"
	"github.com/attestantio/dirk/services/walletmanager"
	"github.com/pkg/errors"
	"github.com/rs/zerolog"
)
type parameters struct {
	logLevel       zerolog.Level
	monitor        metrics.APIMonitor
	peers          peers.Service
	process        process.Service
	accountManager accountmanager.Service
	walletManager  walletmanager.Service
	lister         lister.Service
	signer         signer.Service
	name           string
	listenAddress  string
	id             uint64
	serverCert     []byte
	serverKey      []byte
	caCert         []byte
}
type Parameter interface {
	apply(*parameters)
}
type parameterFunc func(*parameters)
func (f parameterFunc) apply(p *parameters) {
	f(p)
}
func WithLogLevel(logLevel zerolog.Level) Parameter {
	return parameterFunc(func(p *parameters) {
		p.logLevel = logLevel
	})
}
func WithMonitor(monitor metrics.APIMonitor) Parameter {
	return parameterFunc(func(p *parameters) {
		p.monitor = monitor
	})
}
func WithLister(lister lister.Service) Parameter {
	return parameterFunc(func(p *parameters) {
		p.lister = lister
	})
}
func WithProcess(process process.Service) Parameter {
	return parameterFunc(func(p *parameters) {
		p.process = process
	})
}
func WithSigner(signer signer.Service) Parameter {
	return parameterFunc(func(p *parameters) {
		p.signer = signer
	})
}
func WithPeers(peers peers.Service) Parameter {
	return parameterFunc(func(p *parameters) {
		p.peers = peers
	})
}
func WithWalletManager(walletManager walletmanager.Service) Parameter {
	return parameterFunc(func(p *parameters) {
		p.walletManager = walletManager
	})
}
func WithAccountManager(accountManager accountmanager.Service) Parameter {
	return parameterFunc(func(p *parameters) {
		p.accountManager = accountManager
	})
}