grpc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package grpc is a generated protocol buffer package.

It is generated from these files:

peer.protos

It has these top-level messages:

Empty
GossipTable
Peer
PeersInfo

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterGossipServer

func RegisterGossipServer(s *grpc1.Server, srv GossipServer)

Types

type Empty

type Empty struct {
}

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

type GossipClient

type GossipClient interface {
	PushGossip(ctx context.Context, in *GossipTable, opts ...grpc1.CallOption) (*Empty, error)
	Ping(ctx context.Context, in *Empty, opts ...grpc1.CallOption) (*Empty, error)
	GetGossipTable(ctx context.Context, in *Empty, opts ...grpc1.CallOption) (*GossipTable, error)
	PullGossip(ctx context.Context, in *Empty, opts ...grpc1.CallOption) (*GossipTable, error)
}

func NewGossipClient

func NewGossipClient(cc *grpc1.ClientConn) GossipClient

type GossipServer

type GossipServer interface {
	PushGossip(context.Context, *GossipTable) (*Empty, error)
	Ping(context.Context, *Empty) (*Empty, error)
	GetGossipTable(context.Context, *Empty) (*GossipTable, error)
	PullGossip(context.Context, *Empty) (*GossipTable, error)
}

type GossipTable

type GossipTable struct {
	MyID string  `protobuf:"bytes,1,opt,name=myID" json:"myID,omitempty"`
	Peer []*Peer `protobuf:"bytes,2,rep,name=Peer" json:"Peer,omitempty"`
}

func (*GossipTable) Descriptor

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

func (*GossipTable) GetMyID

func (m *GossipTable) GetMyID() string

func (*GossipTable) GetPeer

func (m *GossipTable) GetPeer() []*Peer

func (*GossipTable) ProtoMessage

func (*GossipTable) ProtoMessage()

func (*GossipTable) Reset

func (m *GossipTable) Reset()

func (*GossipTable) String

func (m *GossipTable) String() string

type Peer

type Peer struct {
	IpAddress string `protobuf:"bytes,1,opt,name=ipAddress" json:"ipAddress,omitempty"`
	PeerID    string `protobuf:"bytes,2,opt,name=peerID" json:"peerID,omitempty"`
	Counter   int64  `protobuf:"varint,3,opt,name=counter" json:"counter,omitempty"`
}

func (*Peer) Descriptor

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

func (*Peer) GetCounter

func (m *Peer) GetCounter() int64

func (*Peer) GetIpAddress

func (m *Peer) GetIpAddress() string

func (*Peer) GetPeerID

func (m *Peer) GetPeerID() string

func (*Peer) ProtoMessage

func (*Peer) ProtoMessage()

func (*Peer) Reset

func (m *Peer) Reset()

func (*Peer) String

func (m *Peer) String() string

type PeersInfo

type PeersInfo struct {
}

func (*PeersInfo) Descriptor

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

func (*PeersInfo) ProtoMessage

func (*PeersInfo) ProtoMessage()

func (*PeersInfo) Reset

func (m *PeersInfo) Reset()

func (*PeersInfo) String

func (m *PeersInfo) String() string

Jump to

Keyboard shortcuts

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