[#270] Add IR epoch tick control call
All checks were successful
ci/woodpecker/pr/pre-commit Pipeline was successful
All checks were successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
c70306b324
commit
af7e288e4a
20 changed files with 711 additions and 127 deletions
|
@ -2,6 +2,8 @@ package control
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/netmap"
|
||||
)
|
||||
|
||||
// Server is an entity that serves
|
||||
|
@ -10,7 +12,8 @@ import (
|
|||
// To gain access to the service, any request must be
|
||||
// signed with a key from the white list.
|
||||
type Server struct {
|
||||
prm Prm
|
||||
prm Prm
|
||||
netmapClient *netmap.Client
|
||||
|
||||
allowedKeys [][]byte
|
||||
}
|
||||
|
@ -29,7 +32,7 @@ func panicOnPrmValue(n string, v any) {
|
|||
// Forms white list from all keys specified via
|
||||
// WithAllowedKeys option and a public key of
|
||||
// the parameterized private key.
|
||||
func New(prm Prm, opts ...Option) *Server {
|
||||
func New(prm Prm, netmapClient *netmap.Client, opts ...Option) *Server {
|
||||
// verify required parameters
|
||||
switch {
|
||||
case prm.healthChecker == nil:
|
||||
|
@ -44,7 +47,8 @@ func New(prm Prm, opts ...Option) *Server {
|
|||
}
|
||||
|
||||
return &Server{
|
||||
prm: prm,
|
||||
prm: prm,
|
||||
netmapClient: netmapClient,
|
||||
|
||||
allowedKeys: append(o.allowedKeys, prm.key.PublicKey().Bytes()),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue