-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsomething.pb.go
122 lines (103 loc) · 3.38 KB
/
something.pb.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
// Code generated by protoc-gen-gogo.
// source: heartbeat.proto
// DO NOT EDIT!
package proto
import proto1 "github.com/gogo/protobuf/proto"
import math "math"
// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto/gogo.pb"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto1.Marshal
var _ = math.Inf
// RemoteOffset keeps track of this client's estimate of its offset from a
// remote server. Error is the maximum error in the reading of this offset, so
// that the real offset should be in the interval [Offset - Error, Offset
// + Error]. If the last heartbeat timed out, Offset = InfiniteOffset.
//
// Offset and error are measured using the remote clock reading technique
// described in http://se.inf.tu-dresden.de/pubs/papers/SRDS1994.pdf, page 6.
type RemoteOffset struct {
// The estimated offset from the remote server, in nanoseconds.
Offset int64 `protobuf:"varint,1,opt,name=offset" json:"offset"`
// The maximum error of the measured offset, in nanoseconds.
Error int64 `protobuf:"varint,2,opt,name=error" json:"error"`
// Measurement time, in nanoseconds from unix epoch.
MeasuredAt int64 `protobuf:"varint,3,opt,name=measured_at" json:"measured_at"`
XXX_unrecognized []byte `json:"-"`
}
func (m *RemoteOffset) Reset() { *m = RemoteOffset{} }
func (m *RemoteOffset) String() string { return proto1.CompactTextString(m) }
func (*RemoteOffset) ProtoMessage() {}
func (m *RemoteOffset) GetOffset() int64 {
if m != nil {
return m.Offset
}
return 0
}
func (m *RemoteOffset) GetError() int64 {
if m != nil {
return m.Error
}
return 0
}
func (m *RemoteOffset) GetMeasuredAt() int64 {
if m != nil {
return m.MeasuredAt
}
return 0
}
// A PingRequest specifies the string to echo in response.
// Fields are exported so that they will be serialized in the rpc call.
type PingRequest struct {
// Echo this string with PingResponse.
Ping string `protobuf:"bytes,1,opt,name=ping" json:"ping"`
// The last offset the client measured with the server.
Offset RemoteOffset `protobuf:"bytes,2,opt,name=offset" json:"offset"`
// The address of the client.
Addr string `protobuf:"bytes,3,opt,name=addr" json:"addr"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PingRequest) Reset() { *m = PingRequest{} }
func (m *PingRequest) String() string { return proto1.CompactTextString(m) }
func (*PingRequest) ProtoMessage() {}
func (m *PingRequest) GetPing() string {
if m != nil {
return m.Ping
}
return ""
}
func (m *PingRequest) GetOffset() RemoteOffset {
if m != nil {
return m.Offset
}
return RemoteOffset{}
}
func (m *PingRequest) GetAddr() string {
if m != nil {
return m.Addr
}
return ""
}
// A PingResponse contains the echoed ping request string.
type PingResponse struct {
// An echo of value sent with PingRequest.
Pong string `protobuf:"bytes,1,opt,name=pong" json:"pong"`
ServerTime int64 `protobuf:"varint,2,opt,name=server_time" json:"server_time"`
XXX_unrecognized []byte `json:"-"`
}
func (m *PingResponse) Reset() { *m = PingResponse{} }
func (m *PingResponse) String() string { return proto1.CompactTextString(m) }
func (*PingResponse) ProtoMessage() {}
func (m *PingResponse) GetPong() string {
if m != nil {
return m.Pong
}
return ""
}
func (m *PingResponse) GetServerTime() int64 {
if m != nil {
return m.ServerTime
}
return 0
}
func init() {
}