Documentation ¶
Overview ¶
Package hub is a generated protocol buffer package.
It is generated from these files:
hub.proto
It has these top-level messages:
PutRequest PutResponse GetRequest GetResponse Message
Index ¶
- func RegisterHubServer(s *grpc.Server, srv HubServer)
- type Client
- type GetRequest
- type GetResponse
- type Handler
- type HubClient
- type HubServer
- type JournalCopyHandler
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetKey() []byte
- func (m *Message) GetOffset() uint64
- func (m *Message) GetTimestamp() int64
- func (m *Message) GetType() uint32
- func (m *Message) GetValue() []byte
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (m *Message) String() string
- type PutRequest
- type PutResponse
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterHubServer ¶
Types ¶
type Client ¶
type GetRequest ¶
type GetRequest struct { ClientID string `protobuf:"bytes,1,opt,name=ClientID" json:"ClientID,omitempty"` JournalDir string `protobuf:"bytes,2,opt,name=JournalDir" json:"JournalDir,omitempty"` Offset uint64 `protobuf:"varint,3,opt,name=Offset" json:"Offset,omitempty"` }
func (*GetRequest) Descriptor ¶
func (*GetRequest) Descriptor() ([]byte, []int)
func (*GetRequest) GetClientID ¶
func (m *GetRequest) GetClientID() string
func (*GetRequest) GetJournalDir ¶
func (m *GetRequest) GetJournalDir() string
func (*GetRequest) GetOffset ¶
func (m *GetRequest) GetOffset() uint64
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) Reset ¶
func (m *GetRequest) Reset()
func (*GetRequest) String ¶
func (m *GetRequest) String() string
type GetResponse ¶
type GetResponse struct {
Messages []*Message `protobuf:"bytes,1,rep,name=Messages" json:"Messages,omitempty"`
}
func (*GetResponse) Descriptor ¶
func (*GetResponse) Descriptor() ([]byte, []int)
func (*GetResponse) GetMessages ¶
func (m *GetResponse) GetMessages() []*Message
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) Reset ¶
func (m *GetResponse) Reset()
func (*GetResponse) String ¶
func (m *GetResponse) String() string
type Handler ¶
type Handler interface { Put(ctx context.Context, req *PutRequest) (*PutResponse, error) Get(ctx context.Context, req *GetRequest) (*GetResponse, error) }
type HubClient ¶
type HubClient interface { Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) }
func NewHubClient ¶
func NewHubClient(cc *grpc.ClientConn) HubClient
type HubServer ¶
type HubServer interface { Put(context.Context, *PutRequest) (*PutResponse, error) Get(context.Context, *GetRequest) (*GetResponse, error) }
type JournalCopyHandler ¶
type JournalCopyHandler struct {
// contains filtered or unexported fields
}
func NewJournalCopyHandler ¶
func NewJournalCopyHandler(dir string) *JournalCopyHandler
func (*JournalCopyHandler) Get ¶
func (h *JournalCopyHandler) Get(ctx context.Context, req *GetRequest) (*GetResponse, error)
func (*JournalCopyHandler) Put ¶
func (h *JournalCopyHandler) Put(ctx context.Context, req *PutRequest) (*PutResponse, error)
type Message ¶
type Message struct { Offset uint64 `protobuf:"varint,1,opt,name=Offset" json:"Offset,omitempty"` Timestamp int64 `protobuf:"varint,2,opt,name=Timestamp" json:"Timestamp,omitempty"` Type uint32 `protobuf:"varint,3,opt,name=Type" json:"Type,omitempty"` Key []byte `protobuf:"bytes,4,opt,name=Key,proto3" json:"Key,omitempty"` Value []byte `protobuf:"bytes,5,opt,name=Value,proto3" json:"Value,omitempty"` }
func (*Message) Descriptor ¶
func (*Message) GetTimestamp ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
type PutRequest ¶
type PutRequest struct { ClientID string `protobuf:"bytes,1,opt,name=ClientID" json:"ClientID,omitempty"` JournalDir string `protobuf:"bytes,2,opt,name=JournalDir" json:"JournalDir,omitempty"` Messages []*Message `protobuf:"bytes,3,rep,name=Messages" json:"Messages,omitempty"` }
func (*PutRequest) Descriptor ¶
func (*PutRequest) Descriptor() ([]byte, []int)
func (*PutRequest) GetClientID ¶
func (m *PutRequest) GetClientID() string
func (*PutRequest) GetJournalDir ¶
func (m *PutRequest) GetJournalDir() string
func (*PutRequest) GetMessages ¶
func (m *PutRequest) GetMessages() []*Message
func (*PutRequest) ProtoMessage ¶
func (*PutRequest) ProtoMessage()
func (*PutRequest) Reset ¶
func (m *PutRequest) Reset()
func (*PutRequest) String ¶
func (m *PutRequest) String() string
type PutResponse ¶
type PutResponse struct { }
func (*PutResponse) Descriptor ¶
func (*PutResponse) Descriptor() ([]byte, []int)
func (*PutResponse) ProtoMessage ¶
func (*PutResponse) ProtoMessage()
func (*PutResponse) Reset ¶
func (m *PutResponse) Reset()
func (*PutResponse) String ¶
func (m *PutResponse) String() string
Click to show internal directories.
Click to hide internal directories.