Documentation ¶
Overview ¶
Package echo is a generated protocol buffer package.
It is generated from these files:
echo.proto
It has these top-level messages:
Time Location Device Request Reply
Index ¶
- func RegisterOrcaServer(s *grpc.Server, srv OrcaServer)
- type Device
- type Location
- type OrcaClient
- type OrcaServer
- type Reply
- func (*Reply) Descriptor() ([]byte, []int)
- func (m *Reply) GetEcho() *Request
- func (m *Reply) GetReceived() *Time
- func (m *Reply) GetReceivedTime() time.Time
- func (m *Reply) GetReceiver() *Device
- func (m *Reply) LogRecord() string
- func (*Reply) ProtoMessage()
- func (m *Reply) Reset()
- func (m *Reply) String() string
- type Request
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterOrcaServer ¶
func RegisterOrcaServer(s *grpc.Server, srv OrcaServer)
RegisterOrcaServer is a generated function
Types ¶
type Device ¶
type Device struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` IPAddr string `protobuf:"bytes,2,opt,name=ipaddr" json:"ipaddr,omitempty"` Domain string `protobuf:"bytes,3,opt,name=domain" json:"domain,omitempty"` Location *Location `protobuf:"bytes,4,opt,name=location" json:"location,omitempty"` }
Device describes an sender or a receiver on the network.
func (*Device) Descriptor ¶
Descriptor is a generated method
func (*Device) GetLocation ¶
GetLocation returns the location message if it exists
type Location ¶
type Location struct { Ipaddr string `protobuf:"bytes,1,opt,name=ipaddr" json:"ipaddr,omitempty"` Latitude float64 `protobuf:"fixed64,2,opt,name=latitude" json:"latitude,omitempty"` Longitude float64 `protobuf:"fixed64,3,opt,name=longitude" json:"longitude,omitempty"` City string `protobuf:"bytes,4,opt,name=city" json:"city,omitempty"` Postal string `protobuf:"bytes,5,opt,name=postal" json:"postal,omitempty"` Country string `protobuf:"bytes,6,opt,name=country" json:"country,omitempty"` Organization string `protobuf:"bytes,7,opt,name=organization" json:"organization,omitempty"` Domain string `protobuf:"bytes,8,opt,name=domain" json:"domain,omitempty"` }
Location describes the results of an GeoIP query
func (*Location) Descriptor ¶
Descriptor is a generated method
type OrcaClient ¶
type OrcaClient interface { // Reflect allows nodes to respond to echo requests with echo replies. Echo(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error) }
OrcaClient is a generated interface
func NewOrcaClient ¶
func NewOrcaClient(cc *grpc.ClientConn) OrcaClient
NewOrcaClient is a generated function
type OrcaServer ¶
type OrcaServer interface { // Reflect allows nodes to respond to echo requests with echo replies. Echo(context.Context, *Request) (*Reply, error) }
OrcaServer is a generated interface
type Reply ¶
type Reply struct { Sequence int64 `protobuf:"varint,1,opt,name=sequence" json:"sequence,omitempty"` Receiver *Device `protobuf:"bytes,2,opt,name=receiver" json:"receiver,omitempty"` Received *Time `protobuf:"bytes,3,opt,name=received" json:"received,omitempty"` Echo *Request `protobuf:"bytes,4,opt,name=echo" json:"echo,omitempty"` }
Reply is used to respond to EchoRequest messages.
func (*Reply) Descriptor ¶
Descriptor is a generated method
func (*Reply) GetReceived ¶
GetReceived returns the received time message if it exists
func (*Reply) GetReceivedTime ¶
GetReceivedTime parses the received time on an Reply message to a time.Time
func (*Reply) GetReceiver ¶
GetReceiver returns the receiver message if it exists
type Request ¶
type Request struct { Sequence int64 `protobuf:"varint,1,opt,name=sequence" json:"sequence,omitempty"` Sender *Device `protobuf:"bytes,2,opt,name=sender" json:"sender,omitempty"` Sent *Time `protobuf:"bytes,3,opt,name=sent" json:"sent,omitempty"` TTL int64 `protobuf:"varint,4,opt,name=ttl" json:"ttl,omitempty"` Ping int64 `protobuf:"varint,5,opt,name=ping" json:"ping,omitempty"` Payload []byte `protobuf:"bytes,15,opt,name=payload,proto3" json:"payload,omitempty"` }
Request is used to measure latency and uptime.
func (*Request) Descriptor ¶
Descriptor is a generated method
func (*Request) GetSentTime ¶
GetSentTime parses the sent time on an Echo message to a time.Time
type Time ¶
type Time struct { Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"` Nanoseconds int64 `protobuf:"varint,2,opt,name=nanoseconds" json:"nanoseconds,omitempty"` }
Time preserves nanosecond latency measurements by using a custom time struct which should include either seconds or nanoseconds since the Unix epoch as unsigned int64. In Go, use time.Unix to parse this field.
func (*Time) Descriptor ¶
Descriptor is a generated method