service

package
v0.0.0-...-83e1d0d Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	*onet.ServiceProcessor
	// contains filtered or unexported fields
}

Service is our template-service

func (*Service) HashPrivate

func (s *Service) HashPrivate(req *dpcc.HashPrivateRequest) (*dpcc.HashPrivateResponse, error)

HashPrivate receives a reuqest of hash private protocol from the client, executes the corresponding protocol and sends the response back to the client

func (*Service) HashPublic

func (s *Service) HashPublic(req *dpcc.HashPublicRequest) (*dpcc.HashPublicResponse, error)

HashPublic receives a request of hash public protocol from the client, executes the correct protocol and sends the response back to the client

func (*Service) NewProtocol

func (s *Service) NewProtocol(node *onet.TreeNodeInstance, conf *onet.GenericConfig) (onet.ProtocolInstance, error)

NewProtocol is called on all nodes of a Tree (except the root, since it is the one starting the protocol) so it's the Service that will be called to generate the PI on all others node. If you use CreateProtocolOnet, this will not be called, as the Onet will instantiate the protocol on its own. If you need more control at the instantiation of the protocol, use CreateProtocolService, and you can give some extra-configuration to your protocol in here.

Jump to

Keyboard shortcuts

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