protocols_p2p

package
v6.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2018 License: MIT, MIT Imports: 3 Imported by: 0

README

building p2p.pb.go:

protoc --gogo_out=. --proto_path=../../../../../../:/usr/local/opt/protobuf/include:. *.proto

Documentation

Overview

Package protocols_p2p is a generated protocol buffer package.

It is generated from these files:

p2p.proto

It has these top-level messages:

MessageData
PingRequest
PingResponse
EchoRequest
EchoResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EchoRequest

type EchoRequest struct {
	MessageData *MessageData `protobuf:"bytes,1,opt,name=messageData" json:"messageData,omitempty"`
	// method specific data
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}

a protocol define a set of reuqest and responses

func (*EchoRequest) GetMessageData

func (m *EchoRequest) GetMessageData() *MessageData

func (*EchoRequest) ProtoMessage

func (*EchoRequest) ProtoMessage()

func (*EchoRequest) Reset

func (m *EchoRequest) Reset()

func (*EchoRequest) String

func (m *EchoRequest) String() string

type EchoResponse

type EchoResponse struct {
	MessageData *MessageData `protobuf:"bytes,1,opt,name=messageData" json:"messageData,omitempty"`
	// response specific data
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}

func (*EchoResponse) GetMessageData

func (m *EchoResponse) GetMessageData() *MessageData

func (*EchoResponse) ProtoMessage

func (*EchoResponse) ProtoMessage()

func (*EchoResponse) Reset

func (m *EchoResponse) Reset()

func (*EchoResponse) String

func (m *EchoResponse) String() string

type MessageData

type MessageData struct {
	// shared between all requests
	ClientVersion string `protobuf:"bytes,1,opt,name=clientVersion,proto3" json:"clientVersion,omitempty"`
	Timestamp     int64  `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Id            string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	Gossip        bool   `protobuf:"varint,4,opt,name=gossip,proto3" json:"gossip,omitempty"`
	NodeId        string `protobuf:"bytes,5,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
	NodePubKey    []byte `protobuf:"bytes,6,opt,name=nodePubKey,proto3" json:"nodePubKey,omitempty"`
	Sign          string `protobuf:"bytes,7,opt,name=sign,proto3" json:"sign,omitempty"`
}

designed to be shared between all app protocols

func (*MessageData) ProtoMessage

func (*MessageData) ProtoMessage()

func (*MessageData) Reset

func (m *MessageData) Reset()

func (*MessageData) String

func (m *MessageData) String() string

type PingRequest

type PingRequest struct {
	MessageData *MessageData `protobuf:"bytes,1,opt,name=messageData" json:"messageData,omitempty"`
	// method specific data
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}

a protocol define a set of reuqest and responses

func (*PingRequest) GetMessageData

func (m *PingRequest) GetMessageData() *MessageData

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) Reset

func (m *PingRequest) Reset()

func (*PingRequest) String

func (m *PingRequest) String() string

type PingResponse

type PingResponse struct {
	MessageData *MessageData `protobuf:"bytes,1,opt,name=messageData" json:"messageData,omitempty"`
	// response specific data
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
}

func (*PingResponse) GetMessageData

func (m *PingResponse) GetMessageData() *MessageData

func (*PingResponse) ProtoMessage

func (*PingResponse) ProtoMessage()

func (*PingResponse) Reset

func (m *PingResponse) Reset()

func (*PingResponse) String

func (m *PingResponse) String() string

Jump to

Keyboard shortcuts

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