forked from TrueCloudLab/frostfs-node
[#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>
This commit is contained in:
parent
4001ba2967
commit
455fd952dd
5 changed files with 73 additions and 10 deletions
|
@ -1,19 +1,19 @@
|
|||
package control
|
||||
|
||||
import (
|
||||
"crypto/ecdsa"
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
)
|
||||
|
||||
// Prm groups required parameters of
|
||||
// Server's constructor.
|
||||
type Prm struct {
|
||||
key *ecdsa.PrivateKey
|
||||
key keys.PrivateKey
|
||||
|
||||
healthChecker HealthChecker
|
||||
}
|
||||
|
||||
// SetPrivateKey sets private key to sign responses.
|
||||
func (x *Prm) SetPrivateKey(key *ecdsa.PrivateKey) {
|
||||
func (x *Prm) SetPrivateKey(key keys.PrivateKey) {
|
||||
x.key = key
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue