v2rpc

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 11 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Event_EventType_name = map[int32]string{
	0: "CREATE",
	1: "PUT",
	2: "DELETE",
}
View Source
var Event_EventType_value = map[string]int32{
	"CREATE": 0,
	"PUT":    1,
	"DELETE": 2,
}
View Source
var RangeFilter_Hash_name = map[int32]string{
	0: "MD5",
	1: "SHA1",
}
View Source
var RangeFilter_Hash_value = map[string]int32{
	"MD5":  0,
	"SHA1": 1,
}

Functions

func RegisterReadServer

func RegisterReadServer(s *grpc.Server, srv ReadServer)

func RegisterWatchServer

func RegisterWatchServer(s *grpc.Server, srv WatchServer)

func RegisterWriteServer

func RegisterWriteServer(s *grpc.Server, srv WriteServer)

Types

type CompactRequest

type CompactRequest struct {
	// revision is the key-value store revision for the compaction operation.
	Revision uint64 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"`
	// physical is set so the RPC will wait until the compaction is physically
	// applied to the local database such that compacted entries are totally
	// removed from the backend database.
	Physical             bool     `protobuf:"varint,2,opt,name=physical,proto3" json:"physical,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

CompactRequest compacts the key-value store up to a given revision. All superseded keys with a revision less than the compaction revision will be removed.

func (*CompactRequest) Descriptor

func (*CompactRequest) Descriptor() ([]byte, []int)

func (*CompactRequest) GetPhysical

func (m *CompactRequest) GetPhysical() bool

func (*CompactRequest) GetRevision

func (m *CompactRequest) GetRevision() uint64

func (*CompactRequest) ProtoMessage

func (*CompactRequest) ProtoMessage()

func (*CompactRequest) Reset

func (m *CompactRequest) Reset()

func (*CompactRequest) Size

func (m *CompactRequest) Size() (n int)

func (*CompactRequest) String

func (m *CompactRequest) String() string

func (*CompactRequest) XXX_DiscardUnknown

func (m *CompactRequest) XXX_DiscardUnknown()

func (*CompactRequest) XXX_Marshal

func (m *CompactRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CompactRequest) XXX_Merge

func (m *CompactRequest) XXX_Merge(src proto.Message)

func (*CompactRequest) XXX_MessageName

func (*CompactRequest) XXX_MessageName() string

func (*CompactRequest) XXX_Size

func (m *CompactRequest) XXX_Size() int

func (*CompactRequest) XXX_Unmarshal

func (m *CompactRequest) XXX_Unmarshal(b []byte) error

type CompactResponse

type CompactResponse struct {
	Header               *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*CompactResponse) Descriptor

func (*CompactResponse) Descriptor() ([]byte, []int)

func (*CompactResponse) GetHeader

func (m *CompactResponse) GetHeader() *ResponseHeader

func (*CompactResponse) ProtoMessage

func (*CompactResponse) ProtoMessage()

func (*CompactResponse) Reset

func (m *CompactResponse) Reset()

func (*CompactResponse) Size

func (m *CompactResponse) Size() (n int)

func (*CompactResponse) String

func (m *CompactResponse) String() string

func (*CompactResponse) XXX_DiscardUnknown

func (m *CompactResponse) XXX_DiscardUnknown()

func (*CompactResponse) XXX_Marshal

func (m *CompactResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CompactResponse) XXX_Merge

func (m *CompactResponse) XXX_Merge(src proto.Message)

func (*CompactResponse) XXX_MessageName

func (*CompactResponse) XXX_MessageName() string

func (*CompactResponse) XXX_Size

func (m *CompactResponse) XXX_Size() int

func (*CompactResponse) XXX_Unmarshal

func (m *CompactResponse) XXX_Unmarshal(b []byte) error

type CountRequest

type CountRequest struct {
	// key is the first key for the count.
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// end is the upper bound on the requested count [key, end).
	End []byte `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
	// filter when count, only keys which satisfy filter condition requirement will be counted
	Filter               *RangeFilter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*CountRequest) Descriptor

func (*CountRequest) Descriptor() ([]byte, []int)

func (*CountRequest) GetEnd

func (m *CountRequest) GetEnd() []byte

func (*CountRequest) GetFilter

func (m *CountRequest) GetFilter() *RangeFilter

func (*CountRequest) GetKey

func (m *CountRequest) GetKey() []byte

func (*CountRequest) ProtoMessage

func (*CountRequest) ProtoMessage()

func (*CountRequest) Reset

func (m *CountRequest) Reset()

func (*CountRequest) Size

func (m *CountRequest) Size() (n int)

func (*CountRequest) String

func (m *CountRequest) String() string

func (*CountRequest) XXX_DiscardUnknown

func (m *CountRequest) XXX_DiscardUnknown()

func (*CountRequest) XXX_Marshal

func (m *CountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CountRequest) XXX_Merge

func (m *CountRequest) XXX_Merge(src proto.Message)

func (*CountRequest) XXX_MessageName

func (*CountRequest) XXX_MessageName() string

func (*CountRequest) XXX_Size

func (m *CountRequest) XXX_Size() int

func (*CountRequest) XXX_Unmarshal

func (m *CountRequest) XXX_Unmarshal(b []byte) error

type CountResponse

type CountResponse struct {
	Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// count is set to the number of keys within the range when requested.
	Count                uint64   `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CountResponse) Descriptor

func (*CountResponse) Descriptor() ([]byte, []int)

func (*CountResponse) GetCount

func (m *CountResponse) GetCount() uint64

func (*CountResponse) GetHeader

func (m *CountResponse) GetHeader() *ResponseHeader

func (*CountResponse) ProtoMessage

func (*CountResponse) ProtoMessage()

func (*CountResponse) Reset

func (m *CountResponse) Reset()

func (*CountResponse) Size

func (m *CountResponse) Size() (n int)

func (*CountResponse) String

func (m *CountResponse) String() string

func (*CountResponse) XXX_DiscardUnknown

func (m *CountResponse) XXX_DiscardUnknown()

func (*CountResponse) XXX_Marshal

func (m *CountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CountResponse) XXX_Merge

func (m *CountResponse) XXX_Merge(src proto.Message)

func (*CountResponse) XXX_MessageName

func (*CountResponse) XXX_MessageName() string

func (*CountResponse) XXX_Size

func (m *CountResponse) XXX_Size() int

func (*CountResponse) XXX_Unmarshal

func (m *CountResponse) XXX_Unmarshal(b []byte) error

type CreateRequest

type CreateRequest struct {
	// key is the subject key for the comparison operation.
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// value is the value of the given key, in bytes.
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// lease is the lease ttl seconds of the given key.
	Lease                int64    `protobuf:"varint,3,opt,name=lease,proto3" json:"lease,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateRequest) Descriptor

func (*CreateRequest) Descriptor() ([]byte, []int)

func (*CreateRequest) GetKey

func (m *CreateRequest) GetKey() []byte

func (*CreateRequest) GetLease

func (m *CreateRequest) GetLease() int64

func (*CreateRequest) GetValue

func (m *CreateRequest) GetValue() []byte

func (*CreateRequest) ProtoMessage

func (*CreateRequest) ProtoMessage()

func (*CreateRequest) Reset

func (m *CreateRequest) Reset()

func (*CreateRequest) Size

func (m *CreateRequest) Size() (n int)

func (*CreateRequest) String

func (m *CreateRequest) String() string

func (*CreateRequest) XXX_DiscardUnknown

func (m *CreateRequest) XXX_DiscardUnknown()

func (*CreateRequest) XXX_Marshal

func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateRequest) XXX_Merge

func (m *CreateRequest) XXX_Merge(src proto.Message)

func (*CreateRequest) XXX_MessageName

func (*CreateRequest) XXX_MessageName() string

func (*CreateRequest) XXX_Size

func (m *CreateRequest) XXX_Size() int

func (*CreateRequest) XXX_Unmarshal

func (m *CreateRequest) XXX_Unmarshal(b []byte) error

type CreateResponse

type CreateResponse struct {
	Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// succeeded is set to true if the compare evaluated to true or false otherwise.
	Succeeded            bool     `protobuf:"varint,2,opt,name=succeeded,proto3" json:"succeeded,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CreateResponse) Descriptor

func (*CreateResponse) Descriptor() ([]byte, []int)

func (*CreateResponse) GetHeader

func (m *CreateResponse) GetHeader() *ResponseHeader

func (*CreateResponse) GetSucceeded

func (m *CreateResponse) GetSucceeded() bool

func (*CreateResponse) ProtoMessage

func (*CreateResponse) ProtoMessage()

func (*CreateResponse) Reset

func (m *CreateResponse) Reset()

func (*CreateResponse) Size

func (m *CreateResponse) Size() (n int)

func (*CreateResponse) String

func (m *CreateResponse) String() string

func (*CreateResponse) XXX_DiscardUnknown

func (m *CreateResponse) XXX_DiscardUnknown()

func (*CreateResponse) XXX_Marshal

func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CreateResponse) XXX_Merge

func (m *CreateResponse) XXX_Merge(src proto.Message)

func (*CreateResponse) XXX_MessageName

func (*CreateResponse) XXX_MessageName() string

func (*CreateResponse) XXX_Size

func (m *CreateResponse) XXX_Size() int

func (*CreateResponse) XXX_Unmarshal

func (m *CreateResponse) XXX_Unmarshal(b []byte) error

type DeleteRequest

type DeleteRequest struct {
	// key is the subject key for the comparison operation.
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// revison is the revision of the given key, used to compare the revision and delete the value
	Revision             uint64   `protobuf:"varint,2,opt,name=revision,proto3" json:"revision,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DeleteRequest) Descriptor

func (*DeleteRequest) Descriptor() ([]byte, []int)

func (*DeleteRequest) GetKey

func (m *DeleteRequest) GetKey() []byte

func (*DeleteRequest) GetRevision

func (m *DeleteRequest) GetRevision() uint64

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) Reset

func (m *DeleteRequest) Reset()

func (*DeleteRequest) Size

func (m *DeleteRequest) Size() (n int)

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_MessageName

func (*DeleteRequest) XXX_MessageName() string

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 {
	Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// succeeded is set to true if the compare evaluated to true or false otherwise.
	Succeeded bool `protobuf:"varint,2,opt,name=succeeded,proto3" json:"succeeded,omitempty"`
	// kv is set to the key-value which is deleted, when the succeeded is false.
	Kv                   *KeyValue `protobuf:"bytes,3,opt,name=kv,proto3" json:"kv,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*DeleteResponse) Descriptor

func (*DeleteResponse) Descriptor() ([]byte, []int)

func (*DeleteResponse) GetHeader

func (m *DeleteResponse) GetHeader() *ResponseHeader

func (*DeleteResponse) GetKv

func (m *DeleteResponse) GetKv() *KeyValue

func (*DeleteResponse) GetSucceeded

func (m *DeleteResponse) GetSucceeded() bool

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) Reset

func (m *DeleteResponse) Reset()

func (*DeleteResponse) Size

func (m *DeleteResponse) Size() (n int)

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_MessageName

func (*DeleteResponse) XXX_MessageName() string

func (*DeleteResponse) XXX_Size

func (m *DeleteResponse) XXX_Size() int

func (*DeleteResponse) XXX_Unmarshal

func (m *DeleteResponse) XXX_Unmarshal(b []byte) error

type Event

type Event struct {
	// type is the kind of event. If type is a CREATE or 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=Event_EventType" json:"type,omitempty"`
	// kv holds the KeyValue for the event.
	// A CREATE event indicates the creation of a key.
	// A PUT event contains current kv pair.
	// 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"`
	// revision is tso which increases monotonically.
	Revision             uint64   `protobuf:"varint,3,opt,name=revision,proto3" json:"revision,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Event) Descriptor

func (*Event) Descriptor() ([]byte, []int)

func (*Event) GetKv

func (m *Event) GetKv() *KeyValue

func (*Event) GetRevision

func (m *Event) GetRevision() uint64

func (*Event) GetType

func (m *Event) GetType() Event_EventType

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) Size

func (m *Event) Size() (n int)

func (*Event) String

func (m *Event) String() string

func (*Event) XXX_DiscardUnknown

func (m *Event) XXX_DiscardUnknown()

func (*Event) XXX_Marshal

func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Event) XXX_Merge

func (m *Event) XXX_Merge(src proto.Message)

func (*Event) XXX_MessageName

func (*Event) XXX_MessageName() string

func (*Event) XXX_Size

func (m *Event) XXX_Size() int

func (*Event) XXX_Unmarshal

func (m *Event) XXX_Unmarshal(b []byte) error

type Event_EventType

type Event_EventType int32
const (
	Event_CREATE Event_EventType = 0
	Event_PUT    Event_EventType = 1
	Event_DELETE Event_EventType = 2
)

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 {
	// key is the identifier in bytes. An empty key is not allowed.
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// revision is the point-in-time of the key-value store to use for the get.
	// If revision is less or equal to zero, the range is over the newest key-value store.
	// If the revision has been compacted, ErrCompacted is returned as a response.
	Revision             uint64   `protobuf:"varint,2,opt,name=revision,proto3" json:"revision,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetRequest) Descriptor

func (*GetRequest) Descriptor() ([]byte, []int)

func (*GetRequest) GetKey

func (m *GetRequest) GetKey() []byte

func (*GetRequest) GetRevision

func (m *GetRequest) GetRevision() uint64

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) 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_MessageName

func (*GetRequest) XXX_MessageName() string

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"`
	// kv is the key-value pair by the get request.
	Kv                   *KeyValue `protobuf:"bytes,2,opt,name=kv,proto3" json:"kv,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*GetResponse) Descriptor

func (*GetResponse) Descriptor() ([]byte, []int)

func (*GetResponse) GetHeader

func (m *GetResponse) GetHeader() *ResponseHeader

func (*GetResponse) GetKv

func (m *GetResponse) GetKv() *KeyValue

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) 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_MessageName

func (*GetResponse) XXX_MessageName() string

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 identifier in bytes. An empty key is not allowed.
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// revision is the revision of latest modification on this key.
	Revision uint64 `protobuf:"varint,2,opt,name=revision,proto3" json:"revision,omitempty"`
	// value is the value held by the key, in bytes.
	Value                []byte   `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*KeyValue) Descriptor

func (*KeyValue) Descriptor() ([]byte, []int)

func (*KeyValue) GetKey

func (m *KeyValue) GetKey() []byte

func (*KeyValue) GetRevision

func (m *KeyValue) GetRevision() uint64

func (*KeyValue) GetValue

func (m *KeyValue) GetValue() []byte

func (*KeyValue) ProtoMessage

func (*KeyValue) ProtoMessage()

func (*KeyValue) Reset

func (m *KeyValue) Reset()

func (*KeyValue) Size

func (m *KeyValue) Size() (n int)

func (*KeyValue) String

func (m *KeyValue) String() string

func (*KeyValue) XXX_DiscardUnknown

func (m *KeyValue) XXX_DiscardUnknown()

func (*KeyValue) XXX_Marshal

func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeyValue) XXX_Merge

func (m *KeyValue) XXX_Merge(src proto.Message)

func (*KeyValue) XXX_MessageName

func (*KeyValue) XXX_MessageName() string

func (*KeyValue) XXX_Size

func (m *KeyValue) XXX_Size() int

func (*KeyValue) XXX_Unmarshal

func (m *KeyValue) XXX_Unmarshal(b []byte) error

type ListPartitionRequest

type ListPartitionRequest struct {
	// key is the first key for partition list.
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// end is the upper bound on the requested partition list [key, end).
	End                  []byte   `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListPartitionRequest) Descriptor

func (*ListPartitionRequest) Descriptor() ([]byte, []int)

func (*ListPartitionRequest) GetEnd

func (m *ListPartitionRequest) GetEnd() []byte

func (*ListPartitionRequest) GetKey

func (m *ListPartitionRequest) GetKey() []byte

func (*ListPartitionRequest) ProtoMessage

func (*ListPartitionRequest) ProtoMessage()

func (*ListPartitionRequest) Reset

func (m *ListPartitionRequest) Reset()

func (*ListPartitionRequest) Size

func (m *ListPartitionRequest) Size() (n int)

func (*ListPartitionRequest) String

func (m *ListPartitionRequest) String() string

func (*ListPartitionRequest) XXX_DiscardUnknown

func (m *ListPartitionRequest) XXX_DiscardUnknown()

func (*ListPartitionRequest) XXX_Marshal

func (m *ListPartitionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListPartitionRequest) XXX_Merge

func (m *ListPartitionRequest) XXX_Merge(src proto.Message)

func (*ListPartitionRequest) XXX_MessageName

func (*ListPartitionRequest) XXX_MessageName() string

func (*ListPartitionRequest) XXX_Size

func (m *ListPartitionRequest) XXX_Size() int

func (*ListPartitionRequest) XXX_Unmarshal

func (m *ListPartitionRequest) XXX_Unmarshal(b []byte) error

type ListPartitionResponse

type ListPartitionResponse struct {
	Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// partition_num is the number of partitions .
	PartitionNum int64 `protobuf:"varint,2,opt,name=partition_num,json=partitionNum,proto3" json:"partition_num,omitempty"`
	// partition_keys, format is [ key, partition_split keys ..., end ]
	PartitionKeys        [][]byte `protobuf:"bytes,3,rep,name=partition_keys,json=partitionKeys,proto3" json:"partition_keys,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListPartitionResponse) Descriptor

func (*ListPartitionResponse) Descriptor() ([]byte, []int)

func (*ListPartitionResponse) GetHeader

func (m *ListPartitionResponse) GetHeader() *ResponseHeader

func (*ListPartitionResponse) GetPartitionKeys

func (m *ListPartitionResponse) GetPartitionKeys() [][]byte

func (*ListPartitionResponse) GetPartitionNum

func (m *ListPartitionResponse) GetPartitionNum() int64

func (*ListPartitionResponse) ProtoMessage

func (*ListPartitionResponse) ProtoMessage()

func (*ListPartitionResponse) Reset

func (m *ListPartitionResponse) Reset()

func (*ListPartitionResponse) Size

func (m *ListPartitionResponse) Size() (n int)

func (*ListPartitionResponse) String

func (m *ListPartitionResponse) String() string

func (*ListPartitionResponse) XXX_DiscardUnknown

func (m *ListPartitionResponse) XXX_DiscardUnknown()

func (*ListPartitionResponse) XXX_Marshal

func (m *ListPartitionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListPartitionResponse) XXX_Merge

func (m *ListPartitionResponse) XXX_Merge(src proto.Message)

func (*ListPartitionResponse) XXX_MessageName

func (*ListPartitionResponse) XXX_MessageName() string

func (*ListPartitionResponse) XXX_Size

func (m *ListPartitionResponse) XXX_Size() int

func (*ListPartitionResponse) XXX_Unmarshal

func (m *ListPartitionResponse) XXX_Unmarshal(b []byte) error

type RangeFilter

type RangeFilter struct {
	// hash(key) % shard_num = shard_index
	Hash RangeFilter_Hash `protobuf:"varint,1,opt,name=hash,proto3,enum=RangeFilter_Hash" json:"hash,omitempty"`
	// trim prefix before hash
	TrimPrefix []byte `protobuf:"bytes,2,opt,name=trim_prefix,json=trimPrefix,proto3" json:"trim_prefix,omitempty"`
	// total shard number
	ShardCount int64 `protobuf:"varint,3,opt,name=shard_count,json=shardCount,proto3" json:"shard_count,omitempty"`
	// shard id to filter
	ShardIndex           int64    `protobuf:"varint,4,opt,name=shard_index,json=shardIndex,proto3" json:"shard_index,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RangeFilter) Descriptor

func (*RangeFilter) Descriptor() ([]byte, []int)

func (*RangeFilter) GetHash

func (m *RangeFilter) GetHash() RangeFilter_Hash

func (*RangeFilter) GetShardCount

func (m *RangeFilter) GetShardCount() int64

func (*RangeFilter) GetShardIndex

func (m *RangeFilter) GetShardIndex() int64

func (*RangeFilter) GetTrimPrefix

func (m *RangeFilter) GetTrimPrefix() []byte

func (*RangeFilter) ProtoMessage

func (*RangeFilter) ProtoMessage()

func (*RangeFilter) Reset

func (m *RangeFilter) Reset()

func (*RangeFilter) Size

func (m *RangeFilter) Size() (n int)

func (*RangeFilter) String

func (m *RangeFilter) String() string

func (*RangeFilter) XXX_DiscardUnknown

func (m *RangeFilter) XXX_DiscardUnknown()

func (*RangeFilter) XXX_Marshal

func (m *RangeFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RangeFilter) XXX_Merge

func (m *RangeFilter) XXX_Merge(src proto.Message)

func (*RangeFilter) XXX_MessageName

func (*RangeFilter) XXX_MessageName() string

func (*RangeFilter) XXX_Size

func (m *RangeFilter) XXX_Size() int

func (*RangeFilter) XXX_Unmarshal

func (m *RangeFilter) XXX_Unmarshal(b []byte) error

type RangeFilter_Hash

type RangeFilter_Hash int32
const (
	RangeFilter_MD5  RangeFilter_Hash = 0
	RangeFilter_SHA1 RangeFilter_Hash = 1
)

func (RangeFilter_Hash) EnumDescriptor

func (RangeFilter_Hash) EnumDescriptor() ([]byte, []int)

func (RangeFilter_Hash) String

func (x RangeFilter_Hash) String() string

type RangeRequest

type RangeRequest struct {
	// key is the first key for the range.
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// end is the upper bound on the requested range [key, end).
	End []byte `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
	// limit is a limit on the number of keys returned for the request. When limit is set to 0,
	// it is treated as no limit.
	Limit int64 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// revision is the point-in-time of the key-value store to use for the range.
	// If revision is less or equal to zero, the range is over the newest key-value store.
	// If the revision has been compacted, ErrCompacted is returned as a response.
	Revision uint64 `protobuf:"varint,4,opt,name=revision,proto3" json:"revision,omitempty"`
	// filter when range, only key satisfying filter condition will be returned
	Filter               *RangeFilter `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*RangeRequest) Descriptor

func (*RangeRequest) Descriptor() ([]byte, []int)

func (*RangeRequest) GetEnd

func (m *RangeRequest) GetEnd() []byte

func (*RangeRequest) GetFilter

func (m *RangeRequest) GetFilter() *RangeFilter

func (*RangeRequest) GetKey

func (m *RangeRequest) GetKey() []byte

func (*RangeRequest) GetLimit

func (m *RangeRequest) GetLimit() int64

func (*RangeRequest) GetRevision

func (m *RangeRequest) GetRevision() uint64

func (*RangeRequest) ProtoMessage

func (*RangeRequest) ProtoMessage()

func (*RangeRequest) Reset

func (m *RangeRequest) Reset()

func (*RangeRequest) Size

func (m *RangeRequest) Size() (n int)

func (*RangeRequest) String

func (m *RangeRequest) String() string

func (*RangeRequest) XXX_DiscardUnknown

func (m *RangeRequest) XXX_DiscardUnknown()

func (*RangeRequest) XXX_Marshal

func (m *RangeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RangeRequest) XXX_Merge

func (m *RangeRequest) XXX_Merge(src proto.Message)

func (*RangeRequest) XXX_MessageName

func (*RangeRequest) XXX_MessageName() string

func (*RangeRequest) XXX_Size

func (m *RangeRequest) XXX_Size() int

func (*RangeRequest) XXX_Unmarshal

func (m *RangeRequest) XXX_Unmarshal(b []byte) error

type RangeResponse

type RangeResponse struct {
	Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// kvs is the list of key-value pairs matched by the range request.
	Kvs []*KeyValue `protobuf:"bytes,2,rep,name=kvs,proto3" json:"kvs,omitempty"`
	// more indicates if there are more keys to return in the requested range.
	More                 bool     `protobuf:"varint,3,opt,name=more,proto3" json:"more,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RangeResponse) Descriptor

func (*RangeResponse) Descriptor() ([]byte, []int)

func (*RangeResponse) GetHeader

func (m *RangeResponse) GetHeader() *ResponseHeader

func (*RangeResponse) GetKvs

func (m *RangeResponse) GetKvs() []*KeyValue

func (*RangeResponse) GetMore

func (m *RangeResponse) GetMore() bool

func (*RangeResponse) ProtoMessage

func (*RangeResponse) ProtoMessage()

func (*RangeResponse) Reset

func (m *RangeResponse) Reset()

func (*RangeResponse) Size

func (m *RangeResponse) Size() (n int)

func (*RangeResponse) String

func (m *RangeResponse) String() string

func (*RangeResponse) XXX_DiscardUnknown

func (m *RangeResponse) XXX_DiscardUnknown()

func (*RangeResponse) XXX_Marshal

func (m *RangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RangeResponse) XXX_Merge

func (m *RangeResponse) XXX_Merge(src proto.Message)

func (*RangeResponse) XXX_MessageName

func (*RangeResponse) XXX_MessageName() string

func (*RangeResponse) XXX_Size

func (m *RangeResponse) XXX_Size() int

func (*RangeResponse) XXX_Unmarshal

func (m *RangeResponse) XXX_Unmarshal(b []byte) error

type ReadClient

type ReadClient interface {
	// get single key
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	// range keys from key to end
	Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error)
	// rane keys in stream mode
	RangeStream(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (Read_RangeStreamClient, error)
	// count keys from key to end
	Count(ctx context.Context, in *CountRequest, opts ...grpc.CallOption) (*CountResponse, error)
	// list partitions for keys from key to end
	ListPartition(ctx context.Context, in *ListPartitionRequest, opts ...grpc.CallOption) (*ListPartitionResponse, error)
}

ReadClient is the client API for Read service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewReadClient

func NewReadClient(cc *grpc.ClientConn) ReadClient

type ReadServer

type ReadServer interface {
	// get single key
	Get(context.Context, *GetRequest) (*GetResponse, error)
	// range keys from key to end
	Range(context.Context, *RangeRequest) (*RangeResponse, error)
	// rane keys in stream mode
	RangeStream(*RangeRequest, Read_RangeStreamServer) error
	// count keys from key to end
	Count(context.Context, *CountRequest) (*CountResponse, error)
	// list partitions for keys from key to end
	ListPartition(context.Context, *ListPartitionRequest) (*ListPartitionResponse, error)
}

ReadServer is the server API for Read service.

type Read_RangeStreamClient

type Read_RangeStreamClient interface {
	Recv() (*StreamRangeResponse, error)
	grpc.ClientStream
}

type Read_RangeStreamServer

type Read_RangeStreamServer interface {
	Send(*StreamRangeResponse) error
	grpc.ServerStream
}

type ResponseHeader

type ResponseHeader struct {
	// revision is tso which increases monotonically.
	Revision             uint64   `protobuf:"varint,1,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) GetRevision

func (m *ResponseHeader) GetRevision() uint64

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) 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_MessageName

func (*ResponseHeader) XXX_MessageName() string

func (*ResponseHeader) XXX_Size

func (m *ResponseHeader) XXX_Size() int

func (*ResponseHeader) XXX_Unmarshal

func (m *ResponseHeader) XXX_Unmarshal(b []byte) error

type StreamRangeResponse

type StreamRangeResponse struct {
	RangeResponse        *RangeResponse `protobuf:"bytes,1,opt,name=range_response,json=rangeResponse,proto3" json:"range_response,omitempty"`
	Err                  string         `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

func (*StreamRangeResponse) Descriptor

func (*StreamRangeResponse) Descriptor() ([]byte, []int)

func (*StreamRangeResponse) GetErr

func (m *StreamRangeResponse) GetErr() string

func (*StreamRangeResponse) GetRangeResponse

func (m *StreamRangeResponse) GetRangeResponse() *RangeResponse

func (*StreamRangeResponse) ProtoMessage

func (*StreamRangeResponse) ProtoMessage()

func (*StreamRangeResponse) Reset

func (m *StreamRangeResponse) Reset()

func (*StreamRangeResponse) Size

func (m *StreamRangeResponse) Size() (n int)

func (*StreamRangeResponse) String

func (m *StreamRangeResponse) String() string

func (*StreamRangeResponse) XXX_DiscardUnknown

func (m *StreamRangeResponse) XXX_DiscardUnknown()

func (*StreamRangeResponse) XXX_Marshal

func (m *StreamRangeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StreamRangeResponse) XXX_Merge

func (m *StreamRangeResponse) XXX_Merge(src proto.Message)

func (*StreamRangeResponse) XXX_MessageName

func (*StreamRangeResponse) XXX_MessageName() string

func (*StreamRangeResponse) XXX_Size

func (m *StreamRangeResponse) XXX_Size() int

func (*StreamRangeResponse) XXX_Unmarshal

func (m *StreamRangeResponse) XXX_Unmarshal(b []byte) error

type UnimplementedReadServer

type UnimplementedReadServer struct {
}

UnimplementedReadServer can be embedded to have forward compatible implementations.

func (*UnimplementedReadServer) Count

func (*UnimplementedReadServer) Get

func (*UnimplementedReadServer) ListPartition

func (*UnimplementedReadServer) Range

func (*UnimplementedReadServer) RangeStream

type UnimplementedWatchServer

type UnimplementedWatchServer struct {
}

UnimplementedWatchServer can be embedded to have forward compatible implementations.

func (*UnimplementedWatchServer) Watch

type UnimplementedWriteServer

type UnimplementedWriteServer struct {
}

UnimplementedWriteServer can be embedded to have forward compatible implementations.

func (*UnimplementedWriteServer) Compact

func (*UnimplementedWriteServer) Create

func (*UnimplementedWriteServer) Delete

func (*UnimplementedWriteServer) Update

type UpdateRequest

type UpdateRequest struct {
	Kv *KeyValue `protobuf:"bytes,1,opt,name=kv,proto3" json:"kv,omitempty"`
	// lease is the lease ttl seconds of the given key.
	Lease                int64    `protobuf:"varint,2,opt,name=lease,proto3" json:"lease,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UpdateRequest) Descriptor

func (*UpdateRequest) Descriptor() ([]byte, []int)

func (*UpdateRequest) GetKv

func (m *UpdateRequest) GetKv() *KeyValue

func (*UpdateRequest) GetLease

func (m *UpdateRequest) GetLease() int64

func (*UpdateRequest) ProtoMessage

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) Reset

func (m *UpdateRequest) Reset()

func (*UpdateRequest) Size

func (m *UpdateRequest) Size() (n int)

func (*UpdateRequest) String

func (m *UpdateRequest) String() string

func (*UpdateRequest) XXX_DiscardUnknown

func (m *UpdateRequest) XXX_DiscardUnknown()

func (*UpdateRequest) XXX_Marshal

func (m *UpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UpdateRequest) XXX_Merge

func (m *UpdateRequest) XXX_Merge(src proto.Message)

func (*UpdateRequest) XXX_MessageName

func (*UpdateRequest) XXX_MessageName() string

func (*UpdateRequest) XXX_Size

func (m *UpdateRequest) XXX_Size() int

func (*UpdateRequest) XXX_Unmarshal

func (m *UpdateRequest) XXX_Unmarshal(b []byte) error

type UpdateResponse

type UpdateResponse struct {
	Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// succeeded is set to true if the compare evaluated to true or false otherwise.
	Succeeded bool `protobuf:"varint,2,opt,name=succeeded,proto3" json:"succeeded,omitempty"`
	// kv is set to the key-value which is deleted, when the succeeded is false.
	Kv                   *KeyValue `protobuf:"bytes,3,opt,name=kv,proto3" json:"kv,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*UpdateResponse) Descriptor

func (*UpdateResponse) Descriptor() ([]byte, []int)

func (*UpdateResponse) GetHeader

func (m *UpdateResponse) GetHeader() *ResponseHeader

func (*UpdateResponse) GetKv

func (m *UpdateResponse) GetKv() *KeyValue

func (*UpdateResponse) GetSucceeded

func (m *UpdateResponse) GetSucceeded() bool

func (*UpdateResponse) ProtoMessage

func (*UpdateResponse) ProtoMessage()

func (*UpdateResponse) Reset

func (m *UpdateResponse) Reset()

func (*UpdateResponse) Size

func (m *UpdateResponse) Size() (n int)

func (*UpdateResponse) String

func (m *UpdateResponse) String() string

func (*UpdateResponse) XXX_DiscardUnknown

func (m *UpdateResponse) XXX_DiscardUnknown()

func (*UpdateResponse) XXX_Marshal

func (m *UpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UpdateResponse) XXX_Merge

func (m *UpdateResponse) XXX_Merge(src proto.Message)

func (*UpdateResponse) XXX_MessageName

func (*UpdateResponse) XXX_MessageName() string

func (*UpdateResponse) XXX_Size

func (m *UpdateResponse) XXX_Size() int

func (*UpdateResponse) XXX_Unmarshal

func (m *UpdateResponse) XXX_Unmarshal(b []byte) error

type WatchClient

type WatchClient interface {
	// Watch watches for events happening or that have happened. Both input and output
	// are streams; the input stream is for creating and canceling watchers and the output
	// stream sends events. One watch RPC can watch on multiple key ranges, streaming events
	// for several watches at once. The entire event history can be watched starting from the
	// last compaction revision.
	Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Watch_WatchClient, error)
}

WatchClient is the client API for Watch service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewWatchClient

func NewWatchClient(cc *grpc.ClientConn) WatchClient

type WatchRequest

type WatchRequest struct {
	// key is the first key for the range.
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// end is the upper bound on the requested range [key, end).
	End []byte `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
	// revision is an optional revision to watch from (inclusive). No start_revision is "now".
	Revision uint64 `protobuf:"varint,4,opt,name=revision,proto3" json:"revision,omitempty"`
	// filter when watch, only events which satisfy filter condition requirement will be send to subscriber
	Filter               *RangeFilter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*WatchRequest) Descriptor

func (*WatchRequest) Descriptor() ([]byte, []int)

func (*WatchRequest) GetEnd

func (m *WatchRequest) GetEnd() []byte

func (*WatchRequest) GetFilter

func (m *WatchRequest) GetFilter() *RangeFilter

func (*WatchRequest) GetKey

func (m *WatchRequest) GetKey() []byte

func (*WatchRequest) GetRevision

func (m *WatchRequest) GetRevision() uint64

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) 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_MessageName

func (*WatchRequest) XXX_MessageName() string

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"`
	// events is the list of events matched by the watch request.
	Events []*Event `protobuf:"bytes,2,rep,name=events,proto3" json:"events,omitempty"`
	// err indicates internal err occurs.
	Err                  string   `protobuf:"bytes,5,opt,name=err,proto3" json:"err,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*WatchResponse) Descriptor

func (*WatchResponse) Descriptor() ([]byte, []int)

func (*WatchResponse) GetErr

func (m *WatchResponse) GetErr() string

func (*WatchResponse) GetEvents

func (m *WatchResponse) GetEvents() []*Event

func (*WatchResponse) GetHeader

func (m *WatchResponse) GetHeader() *ResponseHeader

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) 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_MessageName

func (*WatchResponse) XXX_MessageName() string

func (*WatchResponse) XXX_Size

func (m *WatchResponse) XXX_Size() int

func (*WatchResponse) XXX_Unmarshal

func (m *WatchResponse) XXX_Unmarshal(b []byte) error

type WatchServer

type WatchServer interface {
	// Watch watches for events happening or that have happened. Both input and output
	// are streams; the input stream is for creating and canceling watchers and the output
	// stream sends events. One watch RPC can watch on multiple key ranges, streaming events
	// for several watches at once. The entire event history can be watched starting from the
	// last compaction revision.
	Watch(*WatchRequest, Watch_WatchServer) error
}

WatchServer is the server API for Watch service.

type Watch_WatchClient

type Watch_WatchClient interface {
	Recv() (*WatchResponse, error)
	grpc.ClientStream
}

type Watch_WatchServer

type Watch_WatchServer interface {
	Send(*WatchResponse) error
	grpc.ServerStream
}

type WriteClient

type WriteClient interface {
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
	Compact(ctx context.Context, in *CompactRequest, opts ...grpc.CallOption) (*CompactResponse, error)
}

WriteClient is the client API for Write service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewWriteClient

func NewWriteClient(cc *grpc.ClientConn) WriteClient

type WriteServer

WriteServer is the server API for Write service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL