receiver

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	pb.UnimplementedDKGServer
	// contains filtered or unexported fields
}

Handler is the receiver handler, receiving requests in the distributed key generation process.

func New

func New(_ context.Context, params ...Parameter) (*Handler, error)

New creates a new receiver handler.

func (*Handler) Abort

func (h *Handler) Abort(ctx context.Context, req *pb.AbortRequest) (*empty.Empty, error)

Abort handles the Abort() grpc call.

func (*Handler) Commit

func (h *Handler) Commit(ctx context.Context, req *pb.CommitRequest) (*pb.CommitResponse, error)

Commit handles the Commit() grpc call.

func (*Handler) Contribute

func (h *Handler) Contribute(ctx context.Context, req *pb.ContributeRequest) (*pb.ContributeResponse, error)

Contribute receives and returns contributions.

func (*Handler) Execute

func (h *Handler) Execute(ctx context.Context, req *pb.ExecuteRequest) (*empty.Empty, error)

Execute handles the Execute() grpc call.

func (*Handler) Prepare

func (h *Handler) Prepare(ctx context.Context, req *pb.PrepareRequest) (*empty.Empty, error)

Prepare handles the Prepare() grpc call.

type Parameter

type Parameter interface {
	// contains filtered or unexported methods
}

Parameter is the interface for handler parameters.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the handler.

func WithPeers

func WithPeers(peers peers.Service) Parameter

WithPeers sets the peers service for the handler.

func WithProcess

func WithProcess(process process.Service) Parameter

WithProcess sets the process service for the handler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL