pb

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPublisherServer

func RegisterPublisherServer(s *grpc.Server, srv PublisherServer)

Types

type CloseAllPeerConnectionsReply

type CloseAllPeerConnectionsReply struct {
	Success              bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CloseAllPeerConnectionsReply) Descriptor

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

func (*CloseAllPeerConnectionsReply) GetSuccess

func (m *CloseAllPeerConnectionsReply) GetSuccess() bool

func (*CloseAllPeerConnectionsReply) ProtoMessage

func (*CloseAllPeerConnectionsReply) ProtoMessage()

func (*CloseAllPeerConnectionsReply) Reset

func (m *CloseAllPeerConnectionsReply) Reset()

func (*CloseAllPeerConnectionsReply) String

func (*CloseAllPeerConnectionsReply) XXX_DiscardUnknown

func (m *CloseAllPeerConnectionsReply) XXX_DiscardUnknown()

func (*CloseAllPeerConnectionsReply) XXX_Marshal

func (m *CloseAllPeerConnectionsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CloseAllPeerConnectionsReply) XXX_Merge

func (m *CloseAllPeerConnectionsReply) XXX_Merge(src proto.Message)

func (*CloseAllPeerConnectionsReply) XXX_Size

func (m *CloseAllPeerConnectionsReply) XXX_Size() int

func (*CloseAllPeerConnectionsReply) XXX_Unmarshal

func (m *CloseAllPeerConnectionsReply) XXX_Unmarshal(b []byte) error

type ClosePeerConnectionsReply

type ClosePeerConnectionsReply struct {
	Success              bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ClosePeerConnectionsReply) Descriptor

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

func (*ClosePeerConnectionsReply) GetSuccess

func (m *ClosePeerConnectionsReply) GetSuccess() bool

func (*ClosePeerConnectionsReply) ProtoMessage

func (*ClosePeerConnectionsReply) ProtoMessage()

func (*ClosePeerConnectionsReply) Reset

func (m *ClosePeerConnectionsReply) Reset()

func (*ClosePeerConnectionsReply) String

func (m *ClosePeerConnectionsReply) String() string

func (*ClosePeerConnectionsReply) XXX_DiscardUnknown

func (m *ClosePeerConnectionsReply) XXX_DiscardUnknown()

func (*ClosePeerConnectionsReply) XXX_Marshal

func (m *ClosePeerConnectionsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClosePeerConnectionsReply) XXX_Merge

func (m *ClosePeerConnectionsReply) XXX_Merge(src proto.Message)

func (*ClosePeerConnectionsReply) XXX_Size

func (m *ClosePeerConnectionsReply) XXX_Size() int

func (*ClosePeerConnectionsReply) XXX_Unmarshal

func (m *ClosePeerConnectionsReply) XXX_Unmarshal(b []byte) error

type IDReply

type IDReply struct {
	ID                   string   `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*IDReply) Descriptor

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

func (*IDReply) GetID

func (m *IDReply) GetID() string

func (*IDReply) ProtoMessage

func (*IDReply) ProtoMessage()

func (*IDReply) Reset

func (m *IDReply) Reset()

func (*IDReply) String

func (m *IDReply) String() string

func (*IDReply) XXX_DiscardUnknown

func (m *IDReply) XXX_DiscardUnknown()

func (*IDReply) XXX_Marshal

func (m *IDReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IDReply) XXX_Merge

func (m *IDReply) XXX_Merge(src proto.Message)

func (*IDReply) XXX_Size

func (m *IDReply) XXX_Size() int

func (*IDReply) XXX_Unmarshal

func (m *IDReply) XXX_Unmarshal(b []byte) error

type ListenAddressesReply

type ListenAddressesReply struct {
	Addresses            []string `protobuf:"bytes,1,rep,name=Addresses,proto3" json:"Addresses,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListenAddressesReply) Descriptor

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

func (*ListenAddressesReply) GetAddresses

func (m *ListenAddressesReply) GetAddresses() []string

func (*ListenAddressesReply) ProtoMessage

func (*ListenAddressesReply) ProtoMessage()

func (*ListenAddressesReply) Reset

func (m *ListenAddressesReply) Reset()

func (*ListenAddressesReply) String

func (m *ListenAddressesReply) String() string

func (*ListenAddressesReply) XXX_DiscardUnknown

func (m *ListenAddressesReply) XXX_DiscardUnknown()

func (*ListenAddressesReply) XXX_Marshal

func (m *ListenAddressesReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListenAddressesReply) XXX_Merge

func (m *ListenAddressesReply) XXX_Merge(src proto.Message)

func (*ListenAddressesReply) XXX_Size

func (m *ListenAddressesReply) XXX_Size() int

func (*ListenAddressesReply) XXX_Unmarshal

func (m *ListenAddressesReply) XXX_Unmarshal(b []byte) error

type Message

type Message struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Sequence             int32    `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
	Data                 []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Message) Descriptor

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

func (*Message) GetData

func (m *Message) GetData() []byte

func (*Message) GetId

func (m *Message) GetId() string

func (*Message) GetSequence

func (m *Message) GetSequence() int32

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

func (*Message) XXX_DiscardUnknown

func (m *Message) XXX_DiscardUnknown()

func (*Message) XXX_Marshal

func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Message) XXX_Merge

func (m *Message) XXX_Merge(src proto.Message)

func (*Message) XXX_Size

func (m *Message) XXX_Size() int

func (*Message) XXX_Unmarshal

func (m *Message) XXX_Unmarshal(b []byte) error

type OpenPeerConnectionReply

type OpenPeerConnectionReply struct {
	Success              bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Peer                 string   `protobuf:"bytes,2,opt,name=peer,proto3" json:"peer,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*OpenPeerConnectionReply) Descriptor

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

func (*OpenPeerConnectionReply) GetPeer

func (m *OpenPeerConnectionReply) GetPeer() string

func (*OpenPeerConnectionReply) GetSuccess

func (m *OpenPeerConnectionReply) GetSuccess() bool

func (*OpenPeerConnectionReply) ProtoMessage

func (*OpenPeerConnectionReply) ProtoMessage()

func (*OpenPeerConnectionReply) Reset

func (m *OpenPeerConnectionReply) Reset()

func (*OpenPeerConnectionReply) String

func (m *OpenPeerConnectionReply) String() string

func (*OpenPeerConnectionReply) XXX_DiscardUnknown

func (m *OpenPeerConnectionReply) XXX_DiscardUnknown()

func (*OpenPeerConnectionReply) XXX_Marshal

func (m *OpenPeerConnectionReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OpenPeerConnectionReply) XXX_Merge

func (m *OpenPeerConnectionReply) XXX_Merge(src proto.Message)

func (*OpenPeerConnectionReply) XXX_Size

func (m *OpenPeerConnectionReply) XXX_Size() int

func (*OpenPeerConnectionReply) XXX_Unmarshal

func (m *OpenPeerConnectionReply) XXX_Unmarshal(b []byte) error

type OpenPeersConnectionsReplies

type OpenPeersConnectionsReplies struct {
	PeerConnections      []*OpenPeerConnectionReply `protobuf:"bytes,1,rep,name=PeerConnections,proto3" json:"PeerConnections,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
	XXX_unrecognized     []byte                     `json:"-"`
	XXX_sizecache        int32                      `json:"-"`
}

func (*OpenPeersConnectionsReplies) Descriptor

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

func (*OpenPeersConnectionsReplies) GetPeerConnections

func (m *OpenPeersConnectionsReplies) GetPeerConnections() []*OpenPeerConnectionReply

func (*OpenPeersConnectionsReplies) ProtoMessage

func (*OpenPeersConnectionsReplies) ProtoMessage()

func (*OpenPeersConnectionsReplies) Reset

func (m *OpenPeersConnectionsReplies) Reset()

func (*OpenPeersConnectionsReplies) String

func (m *OpenPeersConnectionsReplies) String() string

func (*OpenPeersConnectionsReplies) XXX_DiscardUnknown

func (m *OpenPeersConnectionsReplies) XXX_DiscardUnknown()

func (*OpenPeersConnectionsReplies) XXX_Marshal

func (m *OpenPeersConnectionsReplies) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OpenPeersConnectionsReplies) XXX_Merge

func (m *OpenPeersConnectionsReplies) XXX_Merge(src proto.Message)

func (*OpenPeersConnectionsReplies) XXX_Size

func (m *OpenPeersConnectionsReplies) XXX_Size() int

func (*OpenPeersConnectionsReplies) XXX_Unmarshal

func (m *OpenPeersConnectionsReplies) XXX_Unmarshal(b []byte) error

type PeersList

type PeersList struct {
	Peers                []string `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PeersList) Descriptor

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

func (*PeersList) GetPeers

func (m *PeersList) GetPeers() []string

func (*PeersList) ProtoMessage

func (*PeersList) ProtoMessage()

func (*PeersList) Reset

func (m *PeersList) Reset()

func (*PeersList) String

func (m *PeersList) String() string

func (*PeersList) XXX_DiscardUnknown

func (m *PeersList) XXX_DiscardUnknown()

func (*PeersList) XXX_Marshal

func (m *PeersList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeersList) XXX_Merge

func (m *PeersList) XXX_Merge(src proto.Message)

func (*PeersList) XXX_Size

func (m *PeersList) XXX_Size() int

func (*PeersList) XXX_Unmarshal

func (m *PeersList) XXX_Unmarshal(b []byte) error

type PublishReply

type PublishReply struct {
	MsgId                string   `protobuf:"bytes,1,opt,name=msgId,proto3" json:"msgId,omitempty"`
	Success              bool     `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PublishReply) Descriptor

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

func (*PublishReply) GetMsgId

func (m *PublishReply) GetMsgId() string

func (*PublishReply) GetSuccess

func (m *PublishReply) GetSuccess() bool

func (*PublishReply) ProtoMessage

func (*PublishReply) ProtoMessage()

func (*PublishReply) Reset

func (m *PublishReply) Reset()

func (*PublishReply) String

func (m *PublishReply) String() string

func (*PublishReply) XXX_DiscardUnknown

func (m *PublishReply) XXX_DiscardUnknown()

func (*PublishReply) XXX_Marshal

func (m *PublishReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PublishReply) XXX_Merge

func (m *PublishReply) XXX_Merge(src proto.Message)

func (*PublishReply) XXX_Size

func (m *PublishReply) XXX_Size() int

func (*PublishReply) XXX_Unmarshal

func (m *PublishReply) XXX_Unmarshal(b []byte) error

type PublisherClient

type PublisherClient interface {
	// Publishes a message on the pubsub channel
	PublishMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*PublishReply, error)
	// Closes all connections
	CloseAllPeerConnections(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*CloseAllPeerConnectionsReply, error)
	// Closes connections to listed peers
	ClosePeerConnections(ctx context.Context, in *PeersList, opts ...grpc.CallOption) (*ClosePeerConnectionsReply, error)
	// Opens connections to listed peers
	OpenPeersConnections(ctx context.Context, in *PeersList, opts ...grpc.CallOption) (*OpenPeersConnectionsReplies, error)
	// Lists the host's connected peers
	ListConnectedPeers(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PeersList, error)
	// Shuts the host down
	Shutdown(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ShutdownReply, error)
	// ID returns the host's id
	ID(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*IDReply, error)
	// ListenAddresses returns the host's listen addresses
	ListenAddresses(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ListenAddressesReply, error)
}

PublisherClient is the client API for Publisher service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPublisherClient

func NewPublisherClient(cc *grpc.ClientConn) PublisherClient

type PublisherServer

type PublisherServer interface {
	// Publishes a message on the pubsub channel
	PublishMessage(context.Context, *Message) (*PublishReply, error)
	// Closes all connections
	CloseAllPeerConnections(context.Context, *empty.Empty) (*CloseAllPeerConnectionsReply, error)
	// Closes connections to listed peers
	ClosePeerConnections(context.Context, *PeersList) (*ClosePeerConnectionsReply, error)
	// Opens connections to listed peers
	OpenPeersConnections(context.Context, *PeersList) (*OpenPeersConnectionsReplies, error)
	// Lists the host's connected peers
	ListConnectedPeers(context.Context, *empty.Empty) (*PeersList, error)
	// Shuts the host down
	Shutdown(context.Context, *empty.Empty) (*ShutdownReply, error)
	// ID returns the host's id
	ID(context.Context, *empty.Empty) (*IDReply, error)
	// ListenAddresses returns the host's listen addresses
	ListenAddresses(context.Context, *empty.Empty) (*ListenAddressesReply, error)
}

PublisherServer is the server API for Publisher service.

type ShutdownReply

type ShutdownReply struct {
	Success              bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ShutdownReply) Descriptor

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

func (*ShutdownReply) GetSuccess

func (m *ShutdownReply) GetSuccess() bool

func (*ShutdownReply) ProtoMessage

func (*ShutdownReply) ProtoMessage()

func (*ShutdownReply) Reset

func (m *ShutdownReply) Reset()

func (*ShutdownReply) String

func (m *ShutdownReply) String() string

func (*ShutdownReply) XXX_DiscardUnknown

func (m *ShutdownReply) XXX_DiscardUnknown()

func (*ShutdownReply) XXX_Marshal

func (m *ShutdownReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ShutdownReply) XXX_Merge

func (m *ShutdownReply) XXX_Merge(src proto.Message)

func (*ShutdownReply) XXX_Size

func (m *ShutdownReply) XXX_Size() int

func (*ShutdownReply) XXX_Unmarshal

func (m *ShutdownReply) XXX_Unmarshal(b []byte) error

type UnimplementedPublisherServer

type UnimplementedPublisherServer struct {
}

UnimplementedPublisherServer can be embedded to have forward compatible implementations.

func (*UnimplementedPublisherServer) CloseAllPeerConnections

func (*UnimplementedPublisherServer) ClosePeerConnections

func (*UnimplementedPublisherServer) ID

func (*UnimplementedPublisherServer) ListConnectedPeers

func (*UnimplementedPublisherServer) ListConnectedPeers(ctx context.Context, req *empty.Empty) (*PeersList, error)

func (*UnimplementedPublisherServer) ListenAddresses

func (*UnimplementedPublisherServer) OpenPeersConnections

func (*UnimplementedPublisherServer) PublishMessage

func (*UnimplementedPublisherServer) PublishMessage(ctx context.Context, req *Message) (*PublishReply, error)

func (*UnimplementedPublisherServer) Shutdown

Jump to

Keyboard shortcuts

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