Documentation
¶
Index ¶
- type Service
- func (s *Service) Clock(req *template.Clock) (*template.ClockReply, error)
- func (s *Service) Count(req *template.Count) (*template.CountReply, error)
- func (s *Service) NewProtocol(tn *onet.TreeNodeInstance, conf *onet.GenericConfig) (onet.ProtocolInstance, error)
- func (s *Service) Send(req *template.Transaction) (*template.TransReply, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// We need to embed the ServiceProcessor, so that incoming messages
// are correctly handled.
*onet.ServiceProcessor
// contains filtered or unexported fields
}
Service is our template-service
func (*Service) NewProtocol ¶
func (s *Service) NewProtocol(tn *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.
Click to show internal directories.
Click to hide internal directories.