Documentation ¶
Index ¶
- func RegisterStoreHandler(s server.Server, hdlr StoreHandler, opts ...server.HandlerOption) error
- func RegisterStoreServer(s *grpc.Server, srv StoreServer)
- type DeleteRequest
- func (*DeleteRequest) Descriptor() ([]byte, []int)
- func (m *DeleteRequest) GetKeys() []string
- func (*DeleteRequest) ProtoMessage()
- func (m *DeleteRequest) Reset()
- func (m *DeleteRequest) String() string
- func (m *DeleteRequest) XXX_DiscardUnknown()
- func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DeleteRequest) XXX_Merge(src proto.Message)
- func (m *DeleteRequest) XXX_Size() int
- func (m *DeleteRequest) XXX_Unmarshal(b []byte) error
- type DeleteResponse
- func (*DeleteResponse) Descriptor() ([]byte, []int)
- func (*DeleteResponse) ProtoMessage()
- func (m *DeleteResponse) Reset()
- func (m *DeleteResponse) String() string
- func (m *DeleteResponse) XXX_DiscardUnknown()
- func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DeleteResponse) XXX_Merge(src proto.Message)
- func (m *DeleteResponse) XXX_Size() int
- func (m *DeleteResponse) XXX_Unmarshal(b []byte) error
- type ReadRequest
- func (*ReadRequest) Descriptor() ([]byte, []int)
- func (m *ReadRequest) GetKeys() []string
- func (*ReadRequest) ProtoMessage()
- func (m *ReadRequest) Reset()
- func (m *ReadRequest) String() string
- func (m *ReadRequest) XXX_DiscardUnknown()
- func (m *ReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReadRequest) XXX_Merge(src proto.Message)
- func (m *ReadRequest) XXX_Size() int
- func (m *ReadRequest) XXX_Unmarshal(b []byte) error
- type ReadResponse
- func (*ReadResponse) Descriptor() ([]byte, []int)
- func (m *ReadResponse) GetRecords() []*Record
- func (*ReadResponse) ProtoMessage()
- func (m *ReadResponse) Reset()
- func (m *ReadResponse) String() string
- func (m *ReadResponse) XXX_DiscardUnknown()
- func (m *ReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReadResponse) XXX_Merge(src proto.Message)
- func (m *ReadResponse) XXX_Size() int
- func (m *ReadResponse) XXX_Unmarshal(b []byte) error
- type Record
- func (*Record) Descriptor() ([]byte, []int)
- func (m *Record) GetExpiry() int64
- func (m *Record) GetKey() string
- func (m *Record) GetValue() []byte
- func (*Record) ProtoMessage()
- func (m *Record) Reset()
- func (m *Record) String() string
- func (m *Record) XXX_DiscardUnknown()
- func (m *Record) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Record) XXX_Merge(src proto.Message)
- func (m *Record) XXX_Size() int
- func (m *Record) XXX_Unmarshal(b []byte) error
- type StoreClient
- type StoreHandler
- type StoreServer
- type StoreService
- type Store_SyncClient
- type Store_SyncServer
- type Store_SyncService
- type Store_SyncStream
- type SyncRequest
- func (*SyncRequest) Descriptor() ([]byte, []int)
- func (m *SyncRequest) GetKey() string
- func (*SyncRequest) ProtoMessage()
- func (m *SyncRequest) Reset()
- func (m *SyncRequest) String() string
- func (m *SyncRequest) XXX_DiscardUnknown()
- func (m *SyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SyncRequest) XXX_Merge(src proto.Message)
- func (m *SyncRequest) XXX_Size() int
- func (m *SyncRequest) XXX_Unmarshal(b []byte) error
- type SyncResponse
- func (*SyncResponse) Descriptor() ([]byte, []int)
- func (m *SyncResponse) GetRecords() []*Record
- func (*SyncResponse) ProtoMessage()
- func (m *SyncResponse) Reset()
- func (m *SyncResponse) String() string
- func (m *SyncResponse) XXX_DiscardUnknown()
- func (m *SyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SyncResponse) XXX_Merge(src proto.Message)
- func (m *SyncResponse) XXX_Size() int
- func (m *SyncResponse) XXX_Unmarshal(b []byte) error
- type WriteRequest
- func (*WriteRequest) Descriptor() ([]byte, []int)
- func (m *WriteRequest) GetRecords() []*Record
- func (*WriteRequest) ProtoMessage()
- func (m *WriteRequest) Reset()
- func (m *WriteRequest) String() string
- func (m *WriteRequest) XXX_DiscardUnknown()
- func (m *WriteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WriteRequest) XXX_Merge(src proto.Message)
- func (m *WriteRequest) XXX_Size() int
- func (m *WriteRequest) XXX_Unmarshal(b []byte) error
- type WriteResponse
- func (*WriteResponse) Descriptor() ([]byte, []int)
- func (*WriteResponse) ProtoMessage()
- func (m *WriteResponse) Reset()
- func (m *WriteResponse) String() string
- func (m *WriteResponse) XXX_DiscardUnknown()
- func (m *WriteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WriteResponse) XXX_Merge(src proto.Message)
- func (m *WriteResponse) XXX_Size() int
- func (m *WriteResponse) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterStoreHandler ¶
func RegisterStoreHandler(s server.Server, hdlr StoreHandler, opts ...server.HandlerOption) error
func RegisterStoreServer ¶
func RegisterStoreServer(s *grpc.Server, srv StoreServer)
Types ¶
type DeleteRequest ¶
type DeleteRequest struct { Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DeleteRequest) Descriptor ¶
func (*DeleteRequest) Descriptor() ([]byte, []int)
func (*DeleteRequest) GetKeys ¶
func (m *DeleteRequest) GetKeys() []string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) Reset ¶
func (m *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (m *DeleteRequest) String() string
func (*DeleteRequest) XXX_DiscardUnknown ¶
func (m *DeleteRequest) XXX_DiscardUnknown()
func (*DeleteRequest) XXX_Marshal ¶
func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeleteRequest) XXX_Merge ¶
func (m *DeleteRequest) XXX_Merge(src proto.Message)
func (*DeleteRequest) XXX_Size ¶
func (m *DeleteRequest) XXX_Size() int
func (*DeleteRequest) XXX_Unmarshal ¶
func (m *DeleteRequest) XXX_Unmarshal(b []byte) error
type DeleteResponse ¶
type DeleteResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DeleteResponse) Descriptor ¶
func (*DeleteResponse) Descriptor() ([]byte, []int)
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) Reset ¶
func (m *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (m *DeleteResponse) String() string
func (*DeleteResponse) XXX_DiscardUnknown ¶
func (m *DeleteResponse) XXX_DiscardUnknown()
func (*DeleteResponse) XXX_Marshal ¶
func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeleteResponse) XXX_Merge ¶
func (m *DeleteResponse) XXX_Merge(src proto.Message)
func (*DeleteResponse) XXX_Size ¶
func (m *DeleteResponse) XXX_Size() int
func (*DeleteResponse) XXX_Unmarshal ¶
func (m *DeleteResponse) XXX_Unmarshal(b []byte) error
type ReadRequest ¶
type ReadRequest struct { Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ReadRequest) Descriptor ¶
func (*ReadRequest) Descriptor() ([]byte, []int)
func (*ReadRequest) GetKeys ¶
func (m *ReadRequest) GetKeys() []string
func (*ReadRequest) ProtoMessage ¶
func (*ReadRequest) ProtoMessage()
func (*ReadRequest) Reset ¶
func (m *ReadRequest) Reset()
func (*ReadRequest) String ¶
func (m *ReadRequest) String() string
func (*ReadRequest) XXX_DiscardUnknown ¶
func (m *ReadRequest) XXX_DiscardUnknown()
func (*ReadRequest) XXX_Marshal ¶
func (m *ReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReadRequest) XXX_Merge ¶
func (m *ReadRequest) XXX_Merge(src proto.Message)
func (*ReadRequest) XXX_Size ¶
func (m *ReadRequest) XXX_Size() int
func (*ReadRequest) XXX_Unmarshal ¶
func (m *ReadRequest) XXX_Unmarshal(b []byte) error
type ReadResponse ¶
type ReadResponse struct { Records []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ReadResponse) Descriptor ¶
func (*ReadResponse) Descriptor() ([]byte, []int)
func (*ReadResponse) GetRecords ¶
func (m *ReadResponse) GetRecords() []*Record
func (*ReadResponse) ProtoMessage ¶
func (*ReadResponse) ProtoMessage()
func (*ReadResponse) Reset ¶
func (m *ReadResponse) Reset()
func (*ReadResponse) String ¶
func (m *ReadResponse) String() string
func (*ReadResponse) XXX_DiscardUnknown ¶
func (m *ReadResponse) XXX_DiscardUnknown()
func (*ReadResponse) XXX_Marshal ¶
func (m *ReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReadResponse) XXX_Merge ¶
func (m *ReadResponse) XXX_Merge(src proto.Message)
func (*ReadResponse) XXX_Size ¶
func (m *ReadResponse) XXX_Size() int
func (*ReadResponse) XXX_Unmarshal ¶
func (m *ReadResponse) XXX_Unmarshal(b []byte) error
type Record ¶
type Record struct { // key of the record Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // value in the record Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // timestamp in unix seconds Expiry int64 `protobuf:"varint,3,opt,name=expiry,proto3" json:"expiry,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Record) Descriptor ¶
func (*Record) ProtoMessage ¶
func (*Record) ProtoMessage()
func (*Record) XXX_DiscardUnknown ¶
func (m *Record) XXX_DiscardUnknown()
func (*Record) XXX_Marshal ¶
func (*Record) XXX_Unmarshal ¶
type StoreClient ¶
type StoreClient interface { Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (Store_SyncClient, error) }
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 StoreHandler ¶
type StoreHandler interface { Read(context.Context, *ReadRequest, *ReadResponse) error Write(context.Context, *WriteRequest, *WriteResponse) error Delete(context.Context, *DeleteRequest, *DeleteResponse) error Sync(context.Context, *SyncRequest, Store_SyncStream) error }
type StoreServer ¶
type StoreServer interface { Read(context.Context, *ReadRequest) (*ReadResponse, error) Write(context.Context, *WriteRequest) (*WriteResponse, error) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) Sync(*SyncRequest, Store_SyncServer) error }
StoreServer is the server API for Store service.
type StoreService ¶
type StoreService interface { Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error) Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*WriteResponse, error) Delete(ctx context.Context, in *DeleteRequest, opts ...client.CallOption) (*DeleteResponse, error) Sync(ctx context.Context, in *SyncRequest, opts ...client.CallOption) (Store_SyncService, error) }
func NewStoreService ¶
func NewStoreService(name string, c client.Client) StoreService
type Store_SyncClient ¶
type Store_SyncClient interface { Recv() (*SyncResponse, error) grpc.ClientStream }
type Store_SyncServer ¶
type Store_SyncServer interface { Send(*SyncResponse) error grpc.ServerStream }
type Store_SyncService ¶
type Store_SyncService interface { SendMsg(interface{}) error RecvMsg(interface{}) error Close() error Recv() (*SyncResponse, error) }
type Store_SyncStream ¶
type Store_SyncStream interface { SendMsg(interface{}) error RecvMsg(interface{}) error Close() error Send(*SyncResponse) error }
type SyncRequest ¶
type SyncRequest struct { // optional key Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SyncRequest) Descriptor ¶
func (*SyncRequest) Descriptor() ([]byte, []int)
func (*SyncRequest) GetKey ¶
func (m *SyncRequest) GetKey() string
func (*SyncRequest) ProtoMessage ¶
func (*SyncRequest) ProtoMessage()
func (*SyncRequest) Reset ¶
func (m *SyncRequest) Reset()
func (*SyncRequest) String ¶
func (m *SyncRequest) String() string
func (*SyncRequest) XXX_DiscardUnknown ¶
func (m *SyncRequest) XXX_DiscardUnknown()
func (*SyncRequest) XXX_Marshal ¶
func (m *SyncRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SyncRequest) XXX_Merge ¶
func (m *SyncRequest) XXX_Merge(src proto.Message)
func (*SyncRequest) XXX_Size ¶
func (m *SyncRequest) XXX_Size() int
func (*SyncRequest) XXX_Unmarshal ¶
func (m *SyncRequest) XXX_Unmarshal(b []byte) error
type SyncResponse ¶
type SyncResponse struct { Records []*Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SyncResponse) Descriptor ¶
func (*SyncResponse) Descriptor() ([]byte, []int)
func (*SyncResponse) GetRecords ¶
func (m *SyncResponse) GetRecords() []*Record
func (*SyncResponse) ProtoMessage ¶
func (*SyncResponse) ProtoMessage()
func (*SyncResponse) Reset ¶
func (m *SyncResponse) Reset()
func (*SyncResponse) String ¶
func (m *SyncResponse) String() string
func (*SyncResponse) XXX_DiscardUnknown ¶
func (m *SyncResponse) XXX_DiscardUnknown()
func (*SyncResponse) XXX_Marshal ¶
func (m *SyncResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SyncResponse) XXX_Merge ¶
func (m *SyncResponse) XXX_Merge(src proto.Message)
func (*SyncResponse) XXX_Size ¶
func (m *SyncResponse) XXX_Size() int
func (*SyncResponse) XXX_Unmarshal ¶
func (m *SyncResponse) XXX_Unmarshal(b []byte) error
type WriteRequest ¶
type WriteRequest struct { Records []*Record `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WriteRequest) Descriptor ¶
func (*WriteRequest) Descriptor() ([]byte, []int)
func (*WriteRequest) GetRecords ¶
func (m *WriteRequest) GetRecords() []*Record
func (*WriteRequest) ProtoMessage ¶
func (*WriteRequest) ProtoMessage()
func (*WriteRequest) Reset ¶
func (m *WriteRequest) Reset()
func (*WriteRequest) String ¶
func (m *WriteRequest) String() string
func (*WriteRequest) XXX_DiscardUnknown ¶
func (m *WriteRequest) XXX_DiscardUnknown()
func (*WriteRequest) XXX_Marshal ¶
func (m *WriteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WriteRequest) XXX_Merge ¶
func (m *WriteRequest) XXX_Merge(src proto.Message)
func (*WriteRequest) XXX_Size ¶
func (m *WriteRequest) XXX_Size() int
func (*WriteRequest) XXX_Unmarshal ¶
func (m *WriteRequest) XXX_Unmarshal(b []byte) error
type WriteResponse ¶
type WriteResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WriteResponse) Descriptor ¶
func (*WriteResponse) Descriptor() ([]byte, []int)
func (*WriteResponse) ProtoMessage ¶
func (*WriteResponse) ProtoMessage()
func (*WriteResponse) Reset ¶
func (m *WriteResponse) Reset()
func (*WriteResponse) String ¶
func (m *WriteResponse) String() string
func (*WriteResponse) XXX_DiscardUnknown ¶
func (m *WriteResponse) XXX_DiscardUnknown()
func (*WriteResponse) XXX_Marshal ¶
func (m *WriteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WriteResponse) XXX_Merge ¶
func (m *WriteResponse) XXX_Merge(src proto.Message)
func (*WriteResponse) XXX_Size ¶
func (m *WriteResponse) XXX_Size() int
func (*WriteResponse) XXX_Unmarshal ¶
func (m *WriteResponse) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.