Documentation ¶
Overview ¶
Package keymanager implements the key manager worker.
Index ¶
- Constants
- Variables
- func Enabled() bool
- type Worker
- func (w *Worker) AuthFunc(ctx context.Context, fullMethodName string, req interface{}) error
- func (w *Worker) CallEnclave(ctx context.Context, request *api.CallEnclaveRequest) ([]byte, error)
- func (w *Worker) Cleanup()
- func (w *Worker) Enabled() bool
- func (w *Worker) GetRuntime() runtimeRegistry.Runtime
- func (w *Worker) Initialized() <-chan struct{}
- func (w *Worker) Name() string
- func (w *Worker) NewRuntimeHostHandler() protocol.Handler
- func (w *Worker) NewRuntimeHostNotifier(ctx context.Context, host host.Runtime) protocol.Notifier
- func (w *Worker) Quit() <-chan struct{}
- func (w *Worker) Start() error
- func (w *Worker) Stop()
Constants ¶
const ( // CfgEnabled enables the key manager worker. CfgEnabled = "worker.keymanager.enabled" // CfgRuntimeID configures the runtime ID. CfgRuntimeID = "worker.keymanager.runtime.id" // CfgMayGenerate allows the enclave to generate a master secret. CfgMayGenerate = "worker.keymanager.may_generate" )
Variables ¶
var Flags = flag.NewFlagSet("", flag.ContinueOnError)
Flags has the configuration flags.
Functions ¶
Types ¶
type Worker ¶
type Worker struct { sync.RWMutex *runtimeRegistry.RuntimeHostNode // contains filtered or unexported fields }
The key manager worker.
It behaves differently from other workers as the key manager has its own runtime. It needs to keep track of executor committees for other runtimes in order to update the access control lists.
func New ¶
func New( dataDir string, commonWorker *workerCommon.Worker, ias ias.Endpoint, r *registration.Worker, backend api.Backend, ) (*Worker, error)
New constructs a new key manager worker.
func (*Worker) CallEnclave ¶
CallEnclave sends the request bytes to the target enclave.
func (*Worker) GetRuntime ¶
func (w *Worker) GetRuntime() runtimeRegistry.Runtime
Implements workerCommon.RuntimeHostHandlerFactory.
func (*Worker) Initialized ¶
func (w *Worker) Initialized() <-chan struct{}
Initialized returns a channel that will be closed when the worker is initialized, ready to service requests and registered with the consensus layer.
func (*Worker) NewRuntimeHostHandler ¶
Implements workerCommon.RuntimeHostHandlerFactory.
func (*Worker) NewRuntimeHostNotifier ¶ added in v0.2103.0
Implements workerCommon.RuntimeHostHandlerFactory.