echo

package
v0.0.0-...-ac339c7 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2016 License: MIT Imports: 6 Imported by: 0

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

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

func (*Device) Descriptor() ([]byte, []int)

Descriptor is a generated method

func (*Device) GetLocation

func (m *Device) GetLocation() *Location

GetLocation returns the location message if it exists

func (*Device) ProtoMessage

func (*Device) ProtoMessage()

ProtoMessage is a generated method

func (*Device) Reset

func (m *Device) Reset()

Reset the message

func (*Device) String

func (m *Device) String() string

String returns a string representation of the message

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

func (*Location) Descriptor() ([]byte, []int)

Descriptor is a generated method

func (*Location) ProtoMessage

func (*Location) ProtoMessage()

ProtoMessage is a generated method

func (*Location) Reset

func (m *Location) Reset()

Reset the message

func (*Location) String

func (m *Location) String() string

String returns a string representation of the message

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

func (*Reply) Descriptor() ([]byte, []int)

Descriptor is a generated method

func (*Reply) GetEcho

func (m *Reply) GetEcho() *Request

GetEcho returns the echo request message if it exists

func (*Reply) GetReceived

func (m *Reply) GetReceived() *Time

GetReceived returns the received time message if it exists

func (*Reply) GetReceivedTime

func (m *Reply) GetReceivedTime() time.Time

GetReceivedTime parses the received time on an Reply message to a time.Time

func (*Reply) GetReceiver

func (m *Reply) GetReceiver() *Device

GetReceiver returns the receiver message if it exists

func (*Reply) LogRecord

func (m *Reply) LogRecord() string

LogRecord returns the echo reply as a string in loggable format.

func (*Reply) ProtoMessage

func (*Reply) ProtoMessage()

ProtoMessage is a generated method

func (*Reply) Reset

func (m *Reply) Reset()

Reset the message

func (*Reply) String

func (m *Reply) String() string

String returns a string representation of the message

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

func (*Request) Descriptor() ([]byte, []int)

Descriptor is a generated method

func (*Request) GetSender

func (m *Request) GetSender() *Device

GetSender returns the sender message if it exists

func (*Request) GetSent

func (m *Request) GetSent() *Time

GetSent returns the sent time message if it exists

func (*Request) GetSentTime

func (m *Request) GetSentTime() time.Time

GetSentTime parses the sent time on an Echo message to a time.Time

func (*Request) LogRecord

func (m *Request) LogRecord() string

LogRecord returns the echo request as a string in loggable format.

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

ProtoMessage is a generated method

func (*Request) Reset

func (m *Request) Reset()

Reset the message

func (*Request) String

func (m *Request) String() string

String returns a string representation of the message

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

func (*Time) Descriptor() ([]byte, []int)

Descriptor is a generated method

func (*Time) Parse

func (ts *Time) Parse() time.Time

Parse a Unix timestamp from an echo.Time message.

func (*Time) ProtoMessage

func (*Time) ProtoMessage()

ProtoMessage is a generated method

func (*Time) Reset

func (m *Time) Reset()

Reset the message

func (*Time) String

func (m *Time) String() string

String returns a string representation of the message

Jump to

Keyboard shortcuts

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