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