mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-26 07:59:37 -05:00
ddf94c7373
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
28 lines
587 B
Go
28 lines
587 B
Go
package cmd
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
|
|
"github.com/edgelesssys/constellation/coordinator/atls"
|
|
"github.com/edgelesssys/constellation/coordinator/state"
|
|
)
|
|
|
|
type stubStatusWaiter struct {
|
|
initialized bool
|
|
initializeErr error
|
|
waitForAllErr error
|
|
}
|
|
|
|
func (s *stubStatusWaiter) InitializeValidators([]atls.Validator) error {
|
|
s.initialized = true
|
|
return s.initializeErr
|
|
}
|
|
|
|
func (s *stubStatusWaiter) WaitForAll(ctx context.Context, endpoints []string, status ...state.State) error {
|
|
if !s.initialized {
|
|
return errors.New("waiter not initialized")
|
|
}
|
|
return s.waitForAllErr
|
|
}
|