Documentation
¶
Index ¶
- func RegisterApplicationServer(s *grpc.Server, srv ApplicationServer)
- func RegisterNetworkStreamServer(s *grpc.Server, srv NetworkStreamServer)
- func RegisterStoreServer(s *grpc.Server, srv StoreServer)
- type ApplicationClient
- type ApplicationServer
- type Cluster
- func (*Cluster) Descriptor() ([]byte, []int)
- func (m *Cluster) GetPeers() []*Peer
- func (*Cluster) ProtoMessage()
- func (m *Cluster) Reset()
- func (m *Cluster) String() string
- func (m *Cluster) XXX_DiscardUnknown()
- func (m *Cluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Cluster) XXX_Merge(src proto.Message)
- func (m *Cluster) XXX_Size() int
- func (m *Cluster) XXX_Unmarshal(b []byte) error
- type NetworkStreamClient
- type NetworkStreamServer
- type NetworkStream_HandleClient
- type NetworkStream_HandleServer
- type Peer
- func (*Peer) Descriptor() ([]byte, []int)
- func (m *Peer) GetAddresses() []string
- func (m *Peer) GetId() string
- func (*Peer) ProtoMessage()
- func (m *Peer) Reset()
- func (m *Peer) String() string
- func (m *Peer) XXX_DiscardUnknown()
- func (m *Peer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Peer) XXX_Merge(src proto.Message)
- func (m *Peer) XXX_Size() int
- func (m *Peer) XXX_Unmarshal(b []byte) error
- type StoreClient
- type StoreServer
- type StreamPacket
- func (*StreamPacket) Descriptor() ([]byte, []int)
- func (m *StreamPacket) GetContent() []byte
- func (m *StreamPacket) GetPeerId() string
- func (*StreamPacket) ProtoMessage()
- func (m *StreamPacket) Reset()
- func (m *StreamPacket) String() string
- func (m *StreamPacket) XXX_DiscardUnknown()
- func (m *StreamPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StreamPacket) XXX_Merge(src proto.Message)
- func (m *StreamPacket) XXX_Size() int
- func (m *StreamPacket) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterApplicationServer ¶
func RegisterApplicationServer(s *grpc.Server, srv ApplicationServer)
func RegisterNetworkStreamServer ¶
func RegisterNetworkStreamServer(s *grpc.Server, srv NetworkStreamServer)
func RegisterStoreServer ¶
func RegisterStoreServer(s *grpc.Server, srv StoreServer)
Types ¶
type ApplicationClient ¶
type ApplicationClient interface {
}
ApplicationClient is the client API for Application service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewApplicationClient ¶
func NewApplicationClient(cc *grpc.ClientConn) ApplicationClient
type ApplicationServer ¶
type ApplicationServer interface {
}
ApplicationServer is the server API for Application service.
type Cluster ¶
type Cluster struct {
Peers []*Peer `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
Cluster the peers collection
func (*Cluster) Descriptor ¶
func (*Cluster) ProtoMessage ¶
func (*Cluster) ProtoMessage()
func (*Cluster) XXX_DiscardUnknown ¶
func (m *Cluster) XXX_DiscardUnknown()
func (*Cluster) XXX_Marshal ¶
func (*Cluster) XXX_Unmarshal ¶
type NetworkStreamClient ¶
type NetworkStreamClient interface {
Handle(ctx context.Context, opts ...grpc.CallOption) (NetworkStream_HandleClient, error)
}
NetworkStreamClient is the client API for NetworkStream service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewNetworkStreamClient ¶
func NewNetworkStreamClient(cc *grpc.ClientConn) NetworkStreamClient
type NetworkStreamServer ¶
type NetworkStreamServer interface {
Handle(NetworkStream_HandleServer) error
}
NetworkStreamServer is the server API for NetworkStream service.
type NetworkStream_HandleClient ¶
type NetworkStream_HandleClient interface {
Send(*StreamPacket) error
Recv() (*StreamPacket, error)
grpc.ClientStream
}
type NetworkStream_HandleServer ¶
type NetworkStream_HandleServer interface {
Send(*StreamPacket) error
Recv() (*StreamPacket, error)
grpc.ServerStream
}
type Peer ¶
type Peer struct {
Id string `protobuf:"bytes,1,opt,name=Id,proto3" json:"Id,omitempty"`
Addresses []string `protobuf:"bytes,2,rep,name=Addresses,proto3" json:"Addresses,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*Peer) Descriptor ¶
func (*Peer) GetAddresses ¶
func (*Peer) ProtoMessage ¶
func (*Peer) ProtoMessage()
func (*Peer) XXX_DiscardUnknown ¶
func (m *Peer) XXX_DiscardUnknown()
func (*Peer) XXX_Unmarshal ¶
type StoreClient ¶
type StoreClient interface {
}
StoreClient is the client API for Store service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewStoreClient ¶
func NewStoreClient(cc *grpc.ClientConn) StoreClient
type StreamPacket ¶
type StreamPacket struct {
PeerId string `protobuf:"bytes,1,opt,name=PeerId,proto3" json:"PeerId,omitempty"`
Content []byte `protobuf:"bytes,2,opt,name=Content,proto3" json:"Content,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (*StreamPacket) Descriptor ¶
func (*StreamPacket) Descriptor() ([]byte, []int)
func (*StreamPacket) GetContent ¶
func (m *StreamPacket) GetContent() []byte
func (*StreamPacket) GetPeerId ¶
func (m *StreamPacket) GetPeerId() string
func (*StreamPacket) ProtoMessage ¶
func (*StreamPacket) ProtoMessage()
func (*StreamPacket) Reset ¶
func (m *StreamPacket) Reset()
func (*StreamPacket) String ¶
func (m *StreamPacket) String() string
func (*StreamPacket) XXX_DiscardUnknown ¶
func (m *StreamPacket) XXX_DiscardUnknown()
func (*StreamPacket) XXX_Marshal ¶
func (m *StreamPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StreamPacket) XXX_Merge ¶
func (m *StreamPacket) XXX_Merge(src proto.Message)
func (*StreamPacket) XXX_Size ¶
func (m *StreamPacket) XXX_Size() int
func (*StreamPacket) XXX_Unmarshal ¶
func (m *StreamPacket) XXX_Unmarshal(b []byte) error