Documentation ¶
Index ¶
- func RegisterRelaysServer(s *grpc.Server, srv RelaysServer)
- type ApplyRequest
- func (*ApplyRequest) Descriptor() ([]byte, []int)
- func (m *ApplyRequest) GetAction() uint32
- func (m *ApplyRequest) GetFilter() []byte
- func (m *ApplyRequest) GetNodeId() string
- func (*ApplyRequest) ProtoMessage()
- func (m *ApplyRequest) Reset()
- func (m *ApplyRequest) String() string
- func (m *ApplyRequest) XXX_DiscardUnknown()
- func (m *ApplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ApplyRequest) XXX_Merge(src proto.Message)
- func (m *ApplyRequest) XXX_Size() int
- func (m *ApplyRequest) XXX_Unmarshal(b []byte) error
- type ConnectRequest
- func (*ConnectRequest) Descriptor() ([]byte, []int)
- func (m *ConnectRequest) GetClientId() string
- func (m *ConnectRequest) GetNodeId() string
- func (*ConnectRequest) ProtoMessage()
- func (m *ConnectRequest) Reset()
- func (m *ConnectRequest) String() string
- func (m *ConnectRequest) XXX_DiscardUnknown()
- func (m *ConnectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConnectRequest) XXX_Merge(src proto.Message)
- func (m *ConnectRequest) XXX_Size() int
- func (m *ConnectRequest) XXX_Unmarshal(b []byte) error
- type JoinRequest
- func (*JoinRequest) Descriptor() ([]byte, []int)
- func (m *JoinRequest) GetAddr() string
- func (m *JoinRequest) GetNodeId() string
- func (m *JoinRequest) GetPort() uint32
- func (*JoinRequest) ProtoMessage()
- func (m *JoinRequest) Reset()
- func (m *JoinRequest) String() string
- func (m *JoinRequest) XXX_DiscardUnknown()
- func (m *JoinRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *JoinRequest) XXX_Merge(src proto.Message)
- func (m *JoinRequest) XXX_Size() int
- func (m *JoinRequest) XXX_Unmarshal(b []byte) error
- type PublishRequest
- func (*PublishRequest) Descriptor() ([]byte, []int)
- func (m *PublishRequest) GetClientId() string
- func (m *PublishRequest) GetNodeId() string
- func (m *PublishRequest) GetPayload() []byte
- func (m *PublishRequest) GetProtocolVersion() uint32
- func (*PublishRequest) ProtoMessage()
- func (m *PublishRequest) Reset()
- func (m *PublishRequest) String() string
- func (m *PublishRequest) XXX_DiscardUnknown()
- func (m *PublishRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PublishRequest) XXX_Merge(src proto.Message)
- func (m *PublishRequest) XXX_Size() int
- func (m *PublishRequest) XXX_Unmarshal(b []byte) error
- type RelaysClient
- type RelaysServer
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetOk() bool
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) String() string
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
- type UnimplementedRelaysServer
- func (*UnimplementedRelaysServer) ConnectNotify(ctx context.Context, req *ConnectRequest) (*Response, error)
- func (*UnimplementedRelaysServer) PublishPacket(ctx context.Context, req *PublishRequest) (*Response, error)
- func (*UnimplementedRelaysServer) RaftApply(ctx context.Context, req *ApplyRequest) (*Response, error)
- func (*UnimplementedRelaysServer) RaftJoin(ctx context.Context, req *JoinRequest) (*Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRelaysServer ¶
func RegisterRelaysServer(s *grpc.Server, srv RelaysServer)
Types ¶
type ApplyRequest ¶
type ApplyRequest struct { Action uint32 `protobuf:"varint,1,opt,name=action,proto3" json:"action,omitempty"` NodeId string `protobuf:"bytes,2,opt,name=nodeId,proto3" json:"nodeId,omitempty"` Filter []byte `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ApplyRequest) Descriptor ¶
func (*ApplyRequest) Descriptor() ([]byte, []int)
func (*ApplyRequest) GetAction ¶
func (m *ApplyRequest) GetAction() uint32
func (*ApplyRequest) GetFilter ¶
func (m *ApplyRequest) GetFilter() []byte
func (*ApplyRequest) GetNodeId ¶
func (m *ApplyRequest) GetNodeId() string
func (*ApplyRequest) ProtoMessage ¶
func (*ApplyRequest) ProtoMessage()
func (*ApplyRequest) Reset ¶
func (m *ApplyRequest) Reset()
func (*ApplyRequest) String ¶
func (m *ApplyRequest) String() string
func (*ApplyRequest) XXX_DiscardUnknown ¶
func (m *ApplyRequest) XXX_DiscardUnknown()
func (*ApplyRequest) XXX_Marshal ¶
func (m *ApplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ApplyRequest) XXX_Merge ¶
func (m *ApplyRequest) XXX_Merge(src proto.Message)
func (*ApplyRequest) XXX_Size ¶
func (m *ApplyRequest) XXX_Size() int
func (*ApplyRequest) XXX_Unmarshal ¶
func (m *ApplyRequest) XXX_Unmarshal(b []byte) error
type ConnectRequest ¶
type ConnectRequest struct { NodeId string `protobuf:"bytes,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"` ClientId string `protobuf:"bytes,2,opt,name=clientId,proto3" json:"clientId,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ConnectRequest) Descriptor ¶
func (*ConnectRequest) Descriptor() ([]byte, []int)
func (*ConnectRequest) GetClientId ¶
func (m *ConnectRequest) GetClientId() string
func (*ConnectRequest) GetNodeId ¶
func (m *ConnectRequest) GetNodeId() string
func (*ConnectRequest) ProtoMessage ¶
func (*ConnectRequest) ProtoMessage()
func (*ConnectRequest) Reset ¶
func (m *ConnectRequest) Reset()
func (*ConnectRequest) String ¶
func (m *ConnectRequest) String() string
func (*ConnectRequest) XXX_DiscardUnknown ¶
func (m *ConnectRequest) XXX_DiscardUnknown()
func (*ConnectRequest) XXX_Marshal ¶
func (m *ConnectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConnectRequest) XXX_Merge ¶
func (m *ConnectRequest) XXX_Merge(src proto.Message)
func (*ConnectRequest) XXX_Size ¶
func (m *ConnectRequest) XXX_Size() int
func (*ConnectRequest) XXX_Unmarshal ¶
func (m *ConnectRequest) XXX_Unmarshal(b []byte) error
type JoinRequest ¶
type JoinRequest struct { NodeId string `protobuf:"bytes,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"` Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*JoinRequest) Descriptor ¶
func (*JoinRequest) Descriptor() ([]byte, []int)
func (*JoinRequest) GetAddr ¶
func (m *JoinRequest) GetAddr() string
func (*JoinRequest) GetNodeId ¶
func (m *JoinRequest) GetNodeId() string
func (*JoinRequest) GetPort ¶
func (m *JoinRequest) GetPort() uint32
func (*JoinRequest) ProtoMessage ¶
func (*JoinRequest) ProtoMessage()
func (*JoinRequest) Reset ¶
func (m *JoinRequest) Reset()
func (*JoinRequest) String ¶
func (m *JoinRequest) String() string
func (*JoinRequest) XXX_DiscardUnknown ¶
func (m *JoinRequest) XXX_DiscardUnknown()
func (*JoinRequest) XXX_Marshal ¶
func (m *JoinRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*JoinRequest) XXX_Merge ¶
func (m *JoinRequest) XXX_Merge(src proto.Message)
func (*JoinRequest) XXX_Size ¶
func (m *JoinRequest) XXX_Size() int
func (*JoinRequest) XXX_Unmarshal ¶
func (m *JoinRequest) XXX_Unmarshal(b []byte) error
type PublishRequest ¶
type PublishRequest struct { NodeId string `protobuf:"bytes,1,opt,name=nodeId,proto3" json:"nodeId,omitempty"` ClientId string `protobuf:"bytes,2,opt,name=clientId,proto3" json:"clientId,omitempty"` ProtocolVersion uint32 `protobuf:"varint,3,opt,name=protocolVersion,proto3" json:"protocolVersion,omitempty"` Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*PublishRequest) Descriptor ¶
func (*PublishRequest) Descriptor() ([]byte, []int)
func (*PublishRequest) GetClientId ¶
func (m *PublishRequest) GetClientId() string
func (*PublishRequest) GetNodeId ¶
func (m *PublishRequest) GetNodeId() string
func (*PublishRequest) GetPayload ¶
func (m *PublishRequest) GetPayload() []byte
func (*PublishRequest) GetProtocolVersion ¶
func (m *PublishRequest) GetProtocolVersion() uint32
func (*PublishRequest) ProtoMessage ¶
func (*PublishRequest) ProtoMessage()
func (*PublishRequest) Reset ¶
func (m *PublishRequest) Reset()
func (*PublishRequest) String ¶
func (m *PublishRequest) String() string
func (*PublishRequest) XXX_DiscardUnknown ¶
func (m *PublishRequest) XXX_DiscardUnknown()
func (*PublishRequest) XXX_Marshal ¶
func (m *PublishRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PublishRequest) XXX_Merge ¶
func (m *PublishRequest) XXX_Merge(src proto.Message)
func (*PublishRequest) XXX_Size ¶
func (m *PublishRequest) XXX_Size() int
func (*PublishRequest) XXX_Unmarshal ¶
func (m *PublishRequest) XXX_Unmarshal(b []byte) error
type RelaysClient ¶
type RelaysClient interface { PublishPacket(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*Response, error) ConnectNotify(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (*Response, error) RaftApply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*Response, error) RaftJoin(ctx context.Context, in *JoinRequest, opts ...grpc.CallOption) (*Response, error) }
RelaysClient is the client API for Relays service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRelaysClient ¶
func NewRelaysClient(cc *grpc.ClientConn) RelaysClient
type RelaysServer ¶
type RelaysServer interface { PublishPacket(context.Context, *PublishRequest) (*Response, error) ConnectNotify(context.Context, *ConnectRequest) (*Response, error) RaftApply(context.Context, *ApplyRequest) (*Response, error) RaftJoin(context.Context, *JoinRequest) (*Response, error) }
RelaysServer is the server API for Relays service.
type Response ¶
type Response struct { Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Response) Descriptor ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_Unmarshal ¶
type UnimplementedRelaysServer ¶
type UnimplementedRelaysServer struct { }
UnimplementedRelaysServer can be embedded to have forward compatible implementations.
func (*UnimplementedRelaysServer) ConnectNotify ¶
func (*UnimplementedRelaysServer) ConnectNotify(ctx context.Context, req *ConnectRequest) (*Response, error)
func (*UnimplementedRelaysServer) PublishPacket ¶
func (*UnimplementedRelaysServer) PublishPacket(ctx context.Context, req *PublishRequest) (*Response, error)
func (*UnimplementedRelaysServer) RaftApply ¶
func (*UnimplementedRelaysServer) RaftApply(ctx context.Context, req *ApplyRequest) (*Response, error)
func (*UnimplementedRelaysServer) RaftJoin ¶
func (*UnimplementedRelaysServer) RaftJoin(ctx context.Context, req *JoinRequest) (*Response, error)
Click to show internal directories.
Click to hide internal directories.