Documentation ¶
Index ¶
- Variables
- func RegisterMetaStorageServer(s *grpc.Server, srv MetaStorageServer)
- type Error
- func (*Error) Descriptor() ([]byte, []int)
- func (m *Error) GetMessage() string
- func (m *Error) GetType() ErrorType
- func (m *Error) Marshal() (dAtA []byte, err error)
- func (m *Error) MarshalTo(dAtA []byte) (int, error)
- func (m *Error) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Error) ProtoMessage()
- func (m *Error) Reset()
- func (m *Error) Size() (n int)
- func (m *Error) String() string
- func (m *Error) Unmarshal(dAtA []byte) error
- func (m *Error) XXX_DiscardUnknown()
- func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Error) XXX_Merge(src proto.Message)
- func (m *Error) XXX_Size() int
- func (m *Error) XXX_Unmarshal(b []byte) error
- type ErrorType
- type Event
- func (*Event) Descriptor() ([]byte, []int)
- func (m *Event) GetKv() *KeyValue
- func (m *Event) GetPrevKv() *KeyValue
- func (m *Event) GetType() Event_EventType
- func (m *Event) Marshal() (dAtA []byte, err error)
- func (m *Event) MarshalTo(dAtA []byte) (int, error)
- func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Event) ProtoMessage()
- func (m *Event) Reset()
- func (m *Event) Size() (n int)
- func (m *Event) String() string
- func (m *Event) Unmarshal(dAtA []byte) error
- func (m *Event) XXX_DiscardUnknown()
- func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Event) XXX_Merge(src proto.Message)
- func (m *Event) XXX_Size() int
- func (m *Event) XXX_Unmarshal(b []byte) error
- type Event_EventType
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)
- func (m *GetRequest) GetHeader() *RequestHeader
- func (m *GetRequest) GetKey() []byte
- func (m *GetRequest) GetLimit() int64
- func (m *GetRequest) GetRangeEnd() []byte
- func (m *GetRequest) GetRevision() int64
- func (m *GetRequest) Marshal() (dAtA []byte, err error)
- func (m *GetRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *GetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetRequest) ProtoMessage()
- func (m *GetRequest) Reset()
- func (m *GetRequest) Size() (n int)
- func (m *GetRequest) String() string
- func (m *GetRequest) Unmarshal(dAtA []byte) error
- func (m *GetRequest) XXX_DiscardUnknown()
- func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetRequest) XXX_Merge(src proto.Message)
- func (m *GetRequest) XXX_Size() int
- func (m *GetRequest) XXX_Unmarshal(b []byte) error
- type GetResponse
- func (*GetResponse) Descriptor() ([]byte, []int)
- func (m *GetResponse) GetCount() int64
- func (m *GetResponse) GetHeader() *ResponseHeader
- func (m *GetResponse) GetKvs() []*KeyValue
- func (m *GetResponse) GetMore() bool
- func (m *GetResponse) Marshal() (dAtA []byte, err error)
- func (m *GetResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *GetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GetResponse) ProtoMessage()
- func (m *GetResponse) Reset()
- func (m *GetResponse) Size() (n int)
- func (m *GetResponse) String() string
- func (m *GetResponse) Unmarshal(dAtA []byte) error
- func (m *GetResponse) XXX_DiscardUnknown()
- func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetResponse) XXX_Merge(src proto.Message)
- func (m *GetResponse) XXX_Size() int
- func (m *GetResponse) XXX_Unmarshal(b []byte) error
- type KeyValue
- func (*KeyValue) Descriptor() ([]byte, []int)
- func (m *KeyValue) GetCreateRevision() int64
- func (m *KeyValue) GetKey() []byte
- func (m *KeyValue) GetLease() int64
- func (m *KeyValue) GetModRevision() int64
- func (m *KeyValue) GetValue() []byte
- func (m *KeyValue) GetVersion() int64
- func (m *KeyValue) Marshal() (dAtA []byte, err error)
- func (m *KeyValue) MarshalTo(dAtA []byte) (int, error)
- func (m *KeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*KeyValue) ProtoMessage()
- func (m *KeyValue) Reset()
- func (m *KeyValue) Size() (n int)
- func (m *KeyValue) String() string
- func (m *KeyValue) Unmarshal(dAtA []byte) error
- func (m *KeyValue) XXX_DiscardUnknown()
- func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *KeyValue) XXX_Merge(src proto.Message)
- func (m *KeyValue) XXX_Size() int
- func (m *KeyValue) XXX_Unmarshal(b []byte) error
- type MetaStorageClient
- type MetaStorageServer
- type MetaStorage_WatchClient
- type MetaStorage_WatchServer
- type PutRequest
- func (*PutRequest) Descriptor() ([]byte, []int)
- func (m *PutRequest) GetHeader() *RequestHeader
- func (m *PutRequest) GetKey() []byte
- func (m *PutRequest) GetLease() int64
- func (m *PutRequest) GetPrevKv() bool
- func (m *PutRequest) GetValue() []byte
- func (m *PutRequest) Marshal() (dAtA []byte, err error)
- func (m *PutRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *PutRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PutRequest) ProtoMessage()
- func (m *PutRequest) Reset()
- func (m *PutRequest) Size() (n int)
- func (m *PutRequest) String() string
- func (m *PutRequest) Unmarshal(dAtA []byte) error
- func (m *PutRequest) XXX_DiscardUnknown()
- func (m *PutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PutRequest) XXX_Merge(src proto.Message)
- func (m *PutRequest) XXX_Size() int
- func (m *PutRequest) XXX_Unmarshal(b []byte) error
- type PutResponse
- func (*PutResponse) Descriptor() ([]byte, []int)
- func (m *PutResponse) GetHeader() *ResponseHeader
- func (m *PutResponse) GetPrevKv() *KeyValue
- func (m *PutResponse) Marshal() (dAtA []byte, err error)
- func (m *PutResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *PutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PutResponse) ProtoMessage()
- func (m *PutResponse) Reset()
- func (m *PutResponse) Size() (n int)
- func (m *PutResponse) String() string
- func (m *PutResponse) Unmarshal(dAtA []byte) error
- func (m *PutResponse) XXX_DiscardUnknown()
- func (m *PutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PutResponse) XXX_Merge(src proto.Message)
- func (m *PutResponse) XXX_Size() int
- func (m *PutResponse) XXX_Unmarshal(b []byte) error
- type RequestHeader
- func (*RequestHeader) Descriptor() ([]byte, []int)
- func (m *RequestHeader) GetClusterId() uint64
- func (m *RequestHeader) GetSource() string
- func (m *RequestHeader) Marshal() (dAtA []byte, err error)
- func (m *RequestHeader) MarshalTo(dAtA []byte) (int, error)
- func (m *RequestHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RequestHeader) ProtoMessage()
- func (m *RequestHeader) Reset()
- func (m *RequestHeader) Size() (n int)
- func (m *RequestHeader) String() string
- func (m *RequestHeader) Unmarshal(dAtA []byte) error
- func (m *RequestHeader) XXX_DiscardUnknown()
- func (m *RequestHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RequestHeader) XXX_Merge(src proto.Message)
- func (m *RequestHeader) XXX_Size() int
- func (m *RequestHeader) XXX_Unmarshal(b []byte) error
- type ResponseHeader
- func (*ResponseHeader) Descriptor() ([]byte, []int)
- func (m *ResponseHeader) GetClusterId() uint64
- func (m *ResponseHeader) GetError() *Error
- func (m *ResponseHeader) GetRevision() int64
- func (m *ResponseHeader) Marshal() (dAtA []byte, err error)
- func (m *ResponseHeader) MarshalTo(dAtA []byte) (int, error)
- func (m *ResponseHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ResponseHeader) ProtoMessage()
- func (m *ResponseHeader) Reset()
- func (m *ResponseHeader) Size() (n int)
- func (m *ResponseHeader) String() string
- func (m *ResponseHeader) Unmarshal(dAtA []byte) error
- func (m *ResponseHeader) XXX_DiscardUnknown()
- func (m *ResponseHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ResponseHeader) XXX_Merge(src proto.Message)
- func (m *ResponseHeader) XXX_Size() int
- func (m *ResponseHeader) XXX_Unmarshal(b []byte) error
- type UnimplementedMetaStorageServer
- func (*UnimplementedMetaStorageServer) Get(ctx context.Context, req *GetRequest) (*GetResponse, error)
- func (*UnimplementedMetaStorageServer) Put(ctx context.Context, req *PutRequest) (*PutResponse, error)
- func (*UnimplementedMetaStorageServer) Watch(req *WatchRequest, srv MetaStorage_WatchServer) error
- type WatchRequest
- func (*WatchRequest) Descriptor() ([]byte, []int)
- func (m *WatchRequest) GetHeader() *RequestHeader
- func (m *WatchRequest) GetKey() []byte
- func (m *WatchRequest) GetPrevKv() bool
- func (m *WatchRequest) GetRangeEnd() []byte
- func (m *WatchRequest) GetStartRevision() int64
- func (m *WatchRequest) Marshal() (dAtA []byte, err error)
- func (m *WatchRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *WatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*WatchRequest) ProtoMessage()
- func (m *WatchRequest) Reset()
- func (m *WatchRequest) Size() (n int)
- func (m *WatchRequest) String() string
- func (m *WatchRequest) Unmarshal(dAtA []byte) error
- func (m *WatchRequest) XXX_DiscardUnknown()
- func (m *WatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WatchRequest) XXX_Merge(src proto.Message)
- func (m *WatchRequest) XXX_Size() int
- func (m *WatchRequest) XXX_Unmarshal(b []byte) error
- type WatchResponse
- func (*WatchResponse) Descriptor() ([]byte, []int)
- func (m *WatchResponse) GetCompactRevision() int64
- func (m *WatchResponse) GetEvents() []*Event
- func (m *WatchResponse) GetHeader() *ResponseHeader
- func (m *WatchResponse) Marshal() (dAtA []byte, err error)
- func (m *WatchResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *WatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*WatchResponse) ProtoMessage()
- func (m *WatchResponse) Reset()
- func (m *WatchResponse) Size() (n int)
- func (m *WatchResponse) String() string
- func (m *WatchResponse) Unmarshal(dAtA []byte) error
- func (m *WatchResponse) XXX_DiscardUnknown()
- func (m *WatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WatchResponse) XXX_Merge(src proto.Message)
- func (m *WatchResponse) XXX_Size() int
- func (m *WatchResponse) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthMetaStoragepb = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMetaStoragepb = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMetaStoragepb = fmt.Errorf("proto: unexpected end of group") )
var ErrorType_name = map[int32]string{
0: "OK",
1: "UNKNOWN",
2: "DATA_COMPACTED",
}
var ErrorType_value = map[string]int32{
"OK": 0,
"UNKNOWN": 1,
"DATA_COMPACTED": 2,
}
var Event_EventType_name = map[int32]string{
0: "PUT",
1: "DELETE",
}
var Event_EventType_value = map[string]int32{
"PUT": 0,
"DELETE": 1,
}
Functions ¶
func RegisterMetaStorageServer ¶
func RegisterMetaStorageServer(s *grpc.Server, srv MetaStorageServer)
Types ¶
type Error ¶
type Error struct { Type ErrorType `protobuf:"varint,1,opt,name=type,proto3,enum=meta_storagepb.ErrorType" json:"type,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Error) Descriptor ¶
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) XXX_DiscardUnknown ¶
func (m *Error) XXX_DiscardUnknown()
func (*Error) XXX_Marshal ¶
func (*Error) XXX_Unmarshal ¶
type Event ¶
type Event struct { // type is the kind of event. If type is a PUT, it indicates // new data has been stored to the key. If type is a DELETE, // it indicates the key was deleted. Type Event_EventType `protobuf:"varint,1,opt,name=type,proto3,enum=meta_storagepb.Event_EventType" json:"type,omitempty"` // kv holds the KeyValue for the event. // A PUT event contains current kv pair. // A PUT event with kv.Version=1 indicates the creation of a key. // A DELETE/EXPIRE event contains the deleted key with // its modification revision set to the revision of deletion. Kv *KeyValue `protobuf:"bytes,2,opt,name=kv,proto3" json:"kv,omitempty"` // prev_kv holds the key-value pair before the event happens. PrevKv *KeyValue `protobuf:"bytes,3,opt,name=prev_kv,json=prevKv,proto3" json:"prev_kv,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
copied from etcd https://github.com/etcd-io/etcd/blob/7dfd29b0cc7ce25337276dce646ca2a65aa44b4d/api/mvccpb/kv.proto
func (*Event) Descriptor ¶
func (*Event) GetType ¶
func (m *Event) GetType() Event_EventType
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) XXX_DiscardUnknown ¶
func (m *Event) XXX_DiscardUnknown()
func (*Event) XXX_Marshal ¶
func (*Event) XXX_Unmarshal ¶
type Event_EventType ¶
type Event_EventType int32
const ( Event_PUT Event_EventType = 0 Event_DELETE Event_EventType = 1 )
func (Event_EventType) EnumDescriptor ¶
func (Event_EventType) EnumDescriptor() ([]byte, []int)
func (Event_EventType) String ¶
func (x Event_EventType) String() string
type GetRequest ¶
type GetRequest struct { Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` RangeEnd []byte `protobuf:"bytes,3,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"` Limit int64 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` Revision int64 `protobuf:"varint,5,opt,name=revision,proto3" json:"revision,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
copied part of https://github.com/etcd-io/etcd/blob/7dfd29b0cc7ce25337276dce646ca2a65aa44b4d/api/etcdserverpb/rpc.proto
func (*GetRequest) Descriptor ¶
func (*GetRequest) Descriptor() ([]byte, []int)
func (*GetRequest) GetHeader ¶
func (m *GetRequest) GetHeader() *RequestHeader
func (*GetRequest) GetKey ¶
func (m *GetRequest) GetKey() []byte
func (*GetRequest) GetLimit ¶
func (m *GetRequest) GetLimit() int64
func (*GetRequest) GetRangeEnd ¶
func (m *GetRequest) GetRangeEnd() []byte
func (*GetRequest) GetRevision ¶
func (m *GetRequest) GetRevision() int64
func (*GetRequest) Marshal ¶
func (m *GetRequest) Marshal() (dAtA []byte, err error)
func (*GetRequest) MarshalToSizedBuffer ¶
func (m *GetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) Reset ¶
func (m *GetRequest) Reset()
func (*GetRequest) Size ¶
func (m *GetRequest) Size() (n int)
func (*GetRequest) String ¶
func (m *GetRequest) String() string
func (*GetRequest) Unmarshal ¶
func (m *GetRequest) Unmarshal(dAtA []byte) error
func (*GetRequest) XXX_DiscardUnknown ¶
func (m *GetRequest) XXX_DiscardUnknown()
func (*GetRequest) XXX_Marshal ¶
func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetRequest) XXX_Merge ¶
func (m *GetRequest) XXX_Merge(src proto.Message)
func (*GetRequest) XXX_Size ¶
func (m *GetRequest) XXX_Size() int
func (*GetRequest) XXX_Unmarshal ¶
func (m *GetRequest) XXX_Unmarshal(b []byte) error
type GetResponse ¶
type GetResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` Kvs []*KeyValue `protobuf:"bytes,2,rep,name=kvs,proto3" json:"kvs,omitempty"` More bool `protobuf:"varint,3,opt,name=more,proto3" json:"more,omitempty"` Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
copied part of https://github.com/etcd-io/etcd/blob/7dfd29b0cc7ce25337276dce646ca2a65aa44b4d/api/etcdserverpb/rpc.proto
func (*GetResponse) Descriptor ¶
func (*GetResponse) Descriptor() ([]byte, []int)
func (*GetResponse) GetCount ¶
func (m *GetResponse) GetCount() int64
func (*GetResponse) GetHeader ¶
func (m *GetResponse) GetHeader() *ResponseHeader
func (*GetResponse) GetKvs ¶
func (m *GetResponse) GetKvs() []*KeyValue
func (*GetResponse) GetMore ¶
func (m *GetResponse) GetMore() bool
func (*GetResponse) Marshal ¶
func (m *GetResponse) Marshal() (dAtA []byte, err error)
func (*GetResponse) MarshalToSizedBuffer ¶
func (m *GetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) Reset ¶
func (m *GetResponse) Reset()
func (*GetResponse) Size ¶
func (m *GetResponse) Size() (n int)
func (*GetResponse) String ¶
func (m *GetResponse) String() string
func (*GetResponse) Unmarshal ¶
func (m *GetResponse) Unmarshal(dAtA []byte) error
func (*GetResponse) XXX_DiscardUnknown ¶
func (m *GetResponse) XXX_DiscardUnknown()
func (*GetResponse) XXX_Marshal ¶
func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetResponse) XXX_Merge ¶
func (m *GetResponse) XXX_Merge(src proto.Message)
func (*GetResponse) XXX_Size ¶
func (m *GetResponse) XXX_Size() int
func (*GetResponse) XXX_Unmarshal ¶
func (m *GetResponse) XXX_Unmarshal(b []byte) error
type KeyValue ¶
type KeyValue struct { // key is the key in bytes. An empty key is not allowed. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // create_revision is the revision of last creation on this key. CreateRevision int64 `protobuf:"varint,2,opt,name=create_revision,json=createRevision,proto3" json:"create_revision,omitempty"` // mod_revision is the revision of last modification on this key. ModRevision int64 `protobuf:"varint,3,opt,name=mod_revision,json=modRevision,proto3" json:"mod_revision,omitempty"` // version is the version of the key. A deletion resets // the version to zero and any modification of the key // increases its version. Version int64 `protobuf:"varint,4,opt,name=version,proto3" json:"version,omitempty"` // value is the value held by the key, in bytes. Value []byte `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"` // lease is the ID of the lease that attached to key. // When the attached lease expires, the key will be deleted. // If lease is 0, then no lease is attached to the key. Lease int64 `protobuf:"varint,6,opt,name=lease,proto3" json:"lease,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
copied from etcd https://github.com/etcd-io/etcd/blob/7dfd29b0cc7ce25337276dce646ca2a65aa44b4d/api/mvccpb/kv.proto
func (*KeyValue) Descriptor ¶
func (*KeyValue) GetCreateRevision ¶
func (*KeyValue) GetModRevision ¶
func (*KeyValue) GetVersion ¶
func (*KeyValue) MarshalToSizedBuffer ¶
func (*KeyValue) ProtoMessage ¶
func (*KeyValue) ProtoMessage()
func (*KeyValue) XXX_DiscardUnknown ¶
func (m *KeyValue) XXX_DiscardUnknown()
func (*KeyValue) XXX_Marshal ¶
func (*KeyValue) XXX_Unmarshal ¶
type MetaStorageClient ¶
type MetaStorageClient interface { Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (MetaStorage_WatchClient, error) // Get is the same as etcd Range which might be implemented in a more common way // so that we can use other storages to replace etcd in the future. Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) }
MetaStorageClient is the client API for MetaStorage service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMetaStorageClient ¶
func NewMetaStorageClient(cc *grpc.ClientConn) MetaStorageClient
type MetaStorageServer ¶
type MetaStorageServer interface { Watch(*WatchRequest, MetaStorage_WatchServer) error // Get is the same as etcd Range which might be implemented in a more common way // so that we can use other storages to replace etcd in the future. Get(context.Context, *GetRequest) (*GetResponse, error) Put(context.Context, *PutRequest) (*PutResponse, error) }
MetaStorageServer is the server API for MetaStorage service.
type MetaStorage_WatchClient ¶
type MetaStorage_WatchClient interface { Recv() (*WatchResponse, error) grpc.ClientStream }
type MetaStorage_WatchServer ¶
type MetaStorage_WatchServer interface { Send(*WatchResponse) error grpc.ServerStream }
type PutRequest ¶
type PutRequest struct { Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` Lease int64 `protobuf:"varint,4,opt,name=lease,proto3" json:"lease,omitempty"` PrevKv bool `protobuf:"varint,5,opt,name=prev_kv,json=prevKv,proto3" json:"prev_kv,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
copied part of https://github.com/etcd-io/etcd/blob/7dfd29b0cc7ce25337276dce646ca2a65aa44b4d/api/etcdserverpb/rpc.proto
func (*PutRequest) Descriptor ¶
func (*PutRequest) Descriptor() ([]byte, []int)
func (*PutRequest) GetHeader ¶
func (m *PutRequest) GetHeader() *RequestHeader
func (*PutRequest) GetKey ¶
func (m *PutRequest) GetKey() []byte
func (*PutRequest) GetLease ¶
func (m *PutRequest) GetLease() int64
func (*PutRequest) GetPrevKv ¶
func (m *PutRequest) GetPrevKv() bool
func (*PutRequest) GetValue ¶
func (m *PutRequest) GetValue() []byte
func (*PutRequest) Marshal ¶
func (m *PutRequest) Marshal() (dAtA []byte, err error)
func (*PutRequest) MarshalToSizedBuffer ¶
func (m *PutRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PutRequest) ProtoMessage ¶
func (*PutRequest) ProtoMessage()
func (*PutRequest) Reset ¶
func (m *PutRequest) Reset()
func (*PutRequest) Size ¶
func (m *PutRequest) Size() (n int)
func (*PutRequest) String ¶
func (m *PutRequest) String() string
func (*PutRequest) Unmarshal ¶
func (m *PutRequest) Unmarshal(dAtA []byte) error
func (*PutRequest) XXX_DiscardUnknown ¶
func (m *PutRequest) XXX_DiscardUnknown()
func (*PutRequest) XXX_Marshal ¶
func (m *PutRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PutRequest) XXX_Merge ¶
func (m *PutRequest) XXX_Merge(src proto.Message)
func (*PutRequest) XXX_Size ¶
func (m *PutRequest) XXX_Size() int
func (*PutRequest) XXX_Unmarshal ¶
func (m *PutRequest) XXX_Unmarshal(b []byte) error
type PutResponse ¶
type PutResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` PrevKv *KeyValue `protobuf:"bytes,2,opt,name=prev_kv,json=prevKv,proto3" json:"prev_kv,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
copied part of https://github.com/etcd-io/etcd/blob/7dfd29b0cc7ce25337276dce646ca2a65aa44b4d/api/etcdserverpb/rpc.proto
func (*PutResponse) Descriptor ¶
func (*PutResponse) Descriptor() ([]byte, []int)
func (*PutResponse) GetHeader ¶
func (m *PutResponse) GetHeader() *ResponseHeader
func (*PutResponse) GetPrevKv ¶
func (m *PutResponse) GetPrevKv() *KeyValue
func (*PutResponse) Marshal ¶
func (m *PutResponse) Marshal() (dAtA []byte, err error)
func (*PutResponse) MarshalToSizedBuffer ¶
func (m *PutResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PutResponse) ProtoMessage ¶
func (*PutResponse) ProtoMessage()
func (*PutResponse) Reset ¶
func (m *PutResponse) Reset()
func (*PutResponse) Size ¶
func (m *PutResponse) Size() (n int)
func (*PutResponse) String ¶
func (m *PutResponse) String() string
func (*PutResponse) Unmarshal ¶
func (m *PutResponse) Unmarshal(dAtA []byte) error
func (*PutResponse) XXX_DiscardUnknown ¶
func (m *PutResponse) XXX_DiscardUnknown()
func (*PutResponse) XXX_Marshal ¶
func (m *PutResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PutResponse) XXX_Merge ¶
func (m *PutResponse) XXX_Merge(src proto.Message)
func (*PutResponse) XXX_Size ¶
func (m *PutResponse) XXX_Size() int
func (*PutResponse) XXX_Unmarshal ¶
func (m *PutResponse) XXX_Unmarshal(b []byte) error
type RequestHeader ¶
type RequestHeader struct { // cluster_id is the ID of the cluster which be sent to. ClusterId uint64 `protobuf:"varint,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` // source is the source of the request. Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RequestHeader) Descriptor ¶
func (*RequestHeader) Descriptor() ([]byte, []int)
func (*RequestHeader) GetClusterId ¶
func (m *RequestHeader) GetClusterId() uint64
func (*RequestHeader) GetSource ¶
func (m *RequestHeader) GetSource() string
func (*RequestHeader) Marshal ¶
func (m *RequestHeader) Marshal() (dAtA []byte, err error)
func (*RequestHeader) MarshalToSizedBuffer ¶
func (m *RequestHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RequestHeader) ProtoMessage ¶
func (*RequestHeader) ProtoMessage()
func (*RequestHeader) Reset ¶
func (m *RequestHeader) Reset()
func (*RequestHeader) Size ¶
func (m *RequestHeader) Size() (n int)
func (*RequestHeader) String ¶
func (m *RequestHeader) String() string
func (*RequestHeader) Unmarshal ¶
func (m *RequestHeader) Unmarshal(dAtA []byte) error
func (*RequestHeader) XXX_DiscardUnknown ¶
func (m *RequestHeader) XXX_DiscardUnknown()
func (*RequestHeader) XXX_Marshal ¶
func (m *RequestHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RequestHeader) XXX_Merge ¶
func (m *RequestHeader) XXX_Merge(src proto.Message)
func (*RequestHeader) XXX_Size ¶
func (m *RequestHeader) XXX_Size() int
func (*RequestHeader) XXX_Unmarshal ¶
func (m *RequestHeader) XXX_Unmarshal(b []byte) error
type ResponseHeader ¶
type ResponseHeader struct { // cluster_id is the ID of the cluster which sent the response. ClusterId uint64 `protobuf:"varint,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"` Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` Revision int64 `protobuf:"varint,3,opt,name=revision,proto3" json:"revision,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ResponseHeader) Descriptor ¶
func (*ResponseHeader) Descriptor() ([]byte, []int)
func (*ResponseHeader) GetClusterId ¶
func (m *ResponseHeader) GetClusterId() uint64
func (*ResponseHeader) GetError ¶
func (m *ResponseHeader) GetError() *Error
func (*ResponseHeader) GetRevision ¶
func (m *ResponseHeader) GetRevision() int64
func (*ResponseHeader) Marshal ¶
func (m *ResponseHeader) Marshal() (dAtA []byte, err error)
func (*ResponseHeader) MarshalToSizedBuffer ¶
func (m *ResponseHeader) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ResponseHeader) ProtoMessage ¶
func (*ResponseHeader) ProtoMessage()
func (*ResponseHeader) Reset ¶
func (m *ResponseHeader) Reset()
func (*ResponseHeader) Size ¶
func (m *ResponseHeader) Size() (n int)
func (*ResponseHeader) String ¶
func (m *ResponseHeader) String() string
func (*ResponseHeader) Unmarshal ¶
func (m *ResponseHeader) Unmarshal(dAtA []byte) error
func (*ResponseHeader) XXX_DiscardUnknown ¶
func (m *ResponseHeader) XXX_DiscardUnknown()
func (*ResponseHeader) XXX_Marshal ¶
func (m *ResponseHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ResponseHeader) XXX_Merge ¶
func (m *ResponseHeader) XXX_Merge(src proto.Message)
func (*ResponseHeader) XXX_Size ¶
func (m *ResponseHeader) XXX_Size() int
func (*ResponseHeader) XXX_Unmarshal ¶
func (m *ResponseHeader) XXX_Unmarshal(b []byte) error
type UnimplementedMetaStorageServer ¶
type UnimplementedMetaStorageServer struct { }
UnimplementedMetaStorageServer can be embedded to have forward compatible implementations.
func (*UnimplementedMetaStorageServer) Get ¶
func (*UnimplementedMetaStorageServer) Get(ctx context.Context, req *GetRequest) (*GetResponse, error)
func (*UnimplementedMetaStorageServer) Put ¶
func (*UnimplementedMetaStorageServer) Put(ctx context.Context, req *PutRequest) (*PutResponse, error)
func (*UnimplementedMetaStorageServer) Watch ¶
func (*UnimplementedMetaStorageServer) Watch(req *WatchRequest, srv MetaStorage_WatchServer) error
type WatchRequest ¶
type WatchRequest struct { Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` RangeEnd []byte `protobuf:"bytes,3,opt,name=range_end,json=rangeEnd,proto3" json:"range_end,omitempty"` StartRevision int64 `protobuf:"varint,4,opt,name=start_revision,json=startRevision,proto3" json:"start_revision,omitempty"` PrevKv bool `protobuf:"varint,5,opt,name=prev_kv,json=prevKv,proto3" json:"prev_kv,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
copied part of https://github.com/etcd-io/etcd/blob/7dfd29b0cc7ce25337276dce646ca2a65aa44b4d/api/etcdserverpb/rpc.proto
func (*WatchRequest) Descriptor ¶
func (*WatchRequest) Descriptor() ([]byte, []int)
func (*WatchRequest) GetHeader ¶
func (m *WatchRequest) GetHeader() *RequestHeader
func (*WatchRequest) GetKey ¶
func (m *WatchRequest) GetKey() []byte
func (*WatchRequest) GetPrevKv ¶
func (m *WatchRequest) GetPrevKv() bool
func (*WatchRequest) GetRangeEnd ¶
func (m *WatchRequest) GetRangeEnd() []byte
func (*WatchRequest) GetStartRevision ¶
func (m *WatchRequest) GetStartRevision() int64
func (*WatchRequest) Marshal ¶
func (m *WatchRequest) Marshal() (dAtA []byte, err error)
func (*WatchRequest) MarshalToSizedBuffer ¶
func (m *WatchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*WatchRequest) ProtoMessage ¶
func (*WatchRequest) ProtoMessage()
func (*WatchRequest) Reset ¶
func (m *WatchRequest) Reset()
func (*WatchRequest) Size ¶
func (m *WatchRequest) Size() (n int)
func (*WatchRequest) String ¶
func (m *WatchRequest) String() string
func (*WatchRequest) Unmarshal ¶
func (m *WatchRequest) Unmarshal(dAtA []byte) error
func (*WatchRequest) XXX_DiscardUnknown ¶
func (m *WatchRequest) XXX_DiscardUnknown()
func (*WatchRequest) XXX_Marshal ¶
func (m *WatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WatchRequest) XXX_Merge ¶
func (m *WatchRequest) XXX_Merge(src proto.Message)
func (*WatchRequest) XXX_Size ¶
func (m *WatchRequest) XXX_Size() int
func (*WatchRequest) XXX_Unmarshal ¶
func (m *WatchRequest) XXX_Unmarshal(b []byte) error
type WatchResponse ¶
type WatchResponse struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` CompactRevision int64 `protobuf:"varint,2,opt,name=compact_revision,json=compactRevision,proto3" json:"compact_revision,omitempty"` Events []*Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
copied part of https://github.com/etcd-io/etcd/blob/7dfd29b0cc7ce25337276dce646ca2a65aa44b4d/api/etcdserverpb/rpc.proto
func (*WatchResponse) Descriptor ¶
func (*WatchResponse) Descriptor() ([]byte, []int)
func (*WatchResponse) GetCompactRevision ¶
func (m *WatchResponse) GetCompactRevision() int64
func (*WatchResponse) GetEvents ¶
func (m *WatchResponse) GetEvents() []*Event
func (*WatchResponse) GetHeader ¶
func (m *WatchResponse) GetHeader() *ResponseHeader
func (*WatchResponse) Marshal ¶
func (m *WatchResponse) Marshal() (dAtA []byte, err error)
func (*WatchResponse) MarshalToSizedBuffer ¶
func (m *WatchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*WatchResponse) ProtoMessage ¶
func (*WatchResponse) ProtoMessage()
func (*WatchResponse) Reset ¶
func (m *WatchResponse) Reset()
func (*WatchResponse) Size ¶
func (m *WatchResponse) Size() (n int)
func (*WatchResponse) String ¶
func (m *WatchResponse) String() string
func (*WatchResponse) Unmarshal ¶
func (m *WatchResponse) Unmarshal(dAtA []byte) error
func (*WatchResponse) XXX_DiscardUnknown ¶
func (m *WatchResponse) XXX_DiscardUnknown()
func (*WatchResponse) XXX_Marshal ¶
func (m *WatchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WatchResponse) XXX_Merge ¶
func (m *WatchResponse) XXX_Merge(src proto.Message)
func (*WatchResponse) XXX_Size ¶
func (m *WatchResponse) XXX_Size() int
func (*WatchResponse) XXX_Unmarshal ¶
func (m *WatchResponse) XXX_Unmarshal(b []byte) error