-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathstruct.go
44 lines (36 loc) · 878 Bytes
/
struct.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package template
/*
This holds the messages used to communicate with the service over the network.
*/
import (
"go.dedis.ch/onet/v3"
"go.dedis.ch/onet/v3/network"
)
// We need to register all messages so the network knows how to handle them.
func init() {
network.RegisterMessages(
Count{}, CountReply{},
Clock{}, ClockReply{},
)
}
const (
// ErrorParse indicates an error while parsing the protobuf-file.
ErrorParse = iota + 4000
)
// Clock will run the tepmlate-protocol on the roster and return
// the time spent doing so.
type Clock struct {
Roster *onet.Roster
}
// ClockReply returns the time spent for the protocol-run.
type ClockReply struct {
Time float64
Children int
}
// Count will return how many times the protocol has been run.
type Count struct {
}
// CountReply returns the number of protocol-runs
type CountReply struct {
Count int
}