frostfs-node/pkg/services/control/ir/server/prm.go
Leonard Lyubich 455fd952dd [#414] ir: Serve ControlService
Serve `ControlService` instance on configured endpoint (do not serve if not
specified). Read allowed keys from config.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-15 15:21:52 +03:00

24 lines
475 B
Go

package control
import (
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
)
// Prm groups required parameters of
// Server's constructor.
type Prm struct {
key keys.PrivateKey
healthChecker HealthChecker
}
// SetPrivateKey sets private key to sign responses.
func (x *Prm) SetPrivateKey(key keys.PrivateKey) {
x.key = key
}
// SetHealthChecker sets HealthChecker to calculate
// health status.
func (x *Prm) SetHealthChecker(hc HealthChecker) {
x.healthChecker = hc
}