Documentation
¶
Index ¶
- Variables
- func GenSendKeyDiffRequests(diff client.KeyDiff, maxChunkSize uint64, done <-chan struct{}) <-chan *SendKeyDiffRequest
- func IsApiContractError(err error) bool
- func ProcessSendKeyDiffRequests(reqCh <-chan *SendKeyDiffRequest) <-chan KeyDiffResult
- func RegisterKeyPushServiceServer(s grpc.ServiceRegistrar, srv KeyPushServiceServer)
- type KeyDiff
- func (*KeyDiff) Descriptor() ([]byte, []int)deprecated
- func (x *KeyDiff) GetChanges() *KeyDiffChanges
- func (m *KeyDiff) GetContent() isKeyDiff_Content
- func (x *KeyDiff) GetOverview() *KeyDiffOverview
- func (*KeyDiff) ProtoMessage()
- func (x *KeyDiff) ProtoReflect() protoreflect.Message
- func (x *KeyDiff) Reset()
- func (x *KeyDiff) String() string
- type KeyDiffChange
- func (*KeyDiffChange) Descriptor() ([]byte, []int)deprecated
- func (x *KeyDiffChange) GetKey() string
- func (x *KeyDiffChange) GetType() KeyDiffChangeType
- func (x *KeyDiffChange) GetValue() []byte
- func (*KeyDiffChange) ProtoMessage()
- func (x *KeyDiffChange) ProtoReflect() protoreflect.Message
- func (x *KeyDiffChange) Reset()
- func (x *KeyDiffChange) String() string
- type KeyDiffChangeType
- func (KeyDiffChangeType) Descriptor() protoreflect.EnumDescriptor
- func (x KeyDiffChangeType) Enum() *KeyDiffChangeType
- func (KeyDiffChangeType) EnumDescriptor() ([]byte, []int)deprecated
- func (x KeyDiffChangeType) Number() protoreflect.EnumNumber
- func (x KeyDiffChangeType) String() string
- func (KeyDiffChangeType) Type() protoreflect.EnumType
- type KeyDiffChanges
- type KeyDiffOverview
- func (*KeyDiffOverview) Descriptor() ([]byte, []int)deprecated
- func (x *KeyDiffOverview) GetDeletions() int64
- func (x *KeyDiffOverview) GetInserts() int64
- func (x *KeyDiffOverview) GetUpdates() int64
- func (*KeyDiffOverview) ProtoMessage()
- func (x *KeyDiffOverview) ProtoReflect() protoreflect.Message
- func (x *KeyDiffOverview) Reset()
- func (x *KeyDiffOverview) String() string
- type KeyDiffResult
- type KeyDiff_Changes
- type KeyDiff_Overview
- type KeyPushServiceClient
- type KeyPushServiceServer
- type KeyPushService_SendKeyDiffClient
- type KeyPushService_SendKeyDiffServer
- type SendKeyDiffRequest
- func (*SendKeyDiffRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendKeyDiffRequest) GetKeyDiff() *KeyDiff
- func (*SendKeyDiffRequest) ProtoMessage()
- func (x *SendKeyDiffRequest) ProtoReflect() protoreflect.Message
- func (x *SendKeyDiffRequest) Reset()
- func (x *SendKeyDiffRequest) String() string
- type SendKeyDiffResponse
- type UnimplementedKeyPushServiceServer
- type UnsafeKeyPushServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( KeyDiffChangeType_name = map[int32]string{ 0: "UNSPECIFIED", 1: "INSERT", 2: "UPDATE", 3: "DELETION", } KeyDiffChangeType_value = map[string]int32{ "UNSPECIFIED": 0, "INSERT": 1, "UPDATE": 2, "DELETION": 3, } )
Enum value maps for KeyDiffChangeType.
var ( ErrKeyDiffRequestNotOverview = errors.New("First KeyDiff request was not an overview") ErrKeyDiffRequestNotChanges = errors.New("KeyDiff request after first was not change") ErrKeyDiffRequestOpsMiscount = errors.New("Number of operations in KeyDiff requests did not match overview") ErrInvalidChangeType = errors.New("Change type for one of the changes was not valid") )
var File_api_proto protoreflect.FileDescriptor
var KeyPushService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "keypb.KeyPushService", HandlerType: (*KeyPushServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "SendKeyDiff", Handler: _KeyPushService_SendKeyDiff_Handler, ClientStreams: true, }, }, Metadata: "api.proto", }
KeyPushService_ServiceDesc is the grpc.ServiceDesc for KeyPushService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func GenSendKeyDiffRequests ¶
func GenSendKeyDiffRequests(diff client.KeyDiff, maxChunkSize uint64, done <-chan struct{}) <-chan *SendKeyDiffRequest
func IsApiContractError ¶ added in v0.8.0
func ProcessSendKeyDiffRequests ¶ added in v0.8.0
func ProcessSendKeyDiffRequests(reqCh <-chan *SendKeyDiffRequest) <-chan KeyDiffResult
func RegisterKeyPushServiceServer ¶
func RegisterKeyPushServiceServer(s grpc.ServiceRegistrar, srv KeyPushServiceServer)
Types ¶
type KeyDiff ¶
type KeyDiff struct { // Types that are assignable to Content: // *KeyDiff_Changes // *KeyDiff_Overview Content isKeyDiff_Content `protobuf_oneof:"content"` // contains filtered or unexported fields }
func (*KeyDiff) Descriptor
deprecated
func (*KeyDiff) GetChanges ¶
func (x *KeyDiff) GetChanges() *KeyDiffChanges
func (*KeyDiff) GetContent ¶
func (m *KeyDiff) GetContent() isKeyDiff_Content
func (*KeyDiff) GetOverview ¶
func (x *KeyDiff) GetOverview() *KeyDiffOverview
func (*KeyDiff) ProtoMessage ¶
func (*KeyDiff) ProtoMessage()
func (*KeyDiff) ProtoReflect ¶
func (x *KeyDiff) ProtoReflect() protoreflect.Message
type KeyDiffChange ¶
type KeyDiffChange struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` Type KeyDiffChangeType `protobuf:"varint,3,opt,name=type,proto3,enum=keypb.KeyDiffChangeType" json:"type,omitempty"` // contains filtered or unexported fields }
func (*KeyDiffChange) Descriptor
deprecated
func (*KeyDiffChange) Descriptor() ([]byte, []int)
Deprecated: Use KeyDiffChange.ProtoReflect.Descriptor instead.
func (*KeyDiffChange) GetKey ¶
func (x *KeyDiffChange) GetKey() string
func (*KeyDiffChange) GetType ¶
func (x *KeyDiffChange) GetType() KeyDiffChangeType
func (*KeyDiffChange) GetValue ¶
func (x *KeyDiffChange) GetValue() []byte
func (*KeyDiffChange) ProtoMessage ¶
func (*KeyDiffChange) ProtoMessage()
func (*KeyDiffChange) ProtoReflect ¶
func (x *KeyDiffChange) ProtoReflect() protoreflect.Message
func (*KeyDiffChange) Reset ¶
func (x *KeyDiffChange) Reset()
func (*KeyDiffChange) String ¶
func (x *KeyDiffChange) String() string
type KeyDiffChangeType ¶
type KeyDiffChangeType int32
const ( KeyDiffChangeType_UNSPECIFIED KeyDiffChangeType = 0 KeyDiffChangeType_INSERT KeyDiffChangeType = 1 KeyDiffChangeType_UPDATE KeyDiffChangeType = 2 KeyDiffChangeType_DELETION KeyDiffChangeType = 3 )
func (KeyDiffChangeType) Descriptor ¶
func (KeyDiffChangeType) Descriptor() protoreflect.EnumDescriptor
func (KeyDiffChangeType) Enum ¶
func (x KeyDiffChangeType) Enum() *KeyDiffChangeType
func (KeyDiffChangeType) EnumDescriptor
deprecated
func (KeyDiffChangeType) EnumDescriptor() ([]byte, []int)
Deprecated: Use KeyDiffChangeType.Descriptor instead.
func (KeyDiffChangeType) Number ¶
func (x KeyDiffChangeType) Number() protoreflect.EnumNumber
func (KeyDiffChangeType) String ¶
func (x KeyDiffChangeType) String() string
func (KeyDiffChangeType) Type ¶
func (KeyDiffChangeType) Type() protoreflect.EnumType
type KeyDiffChanges ¶
type KeyDiffChanges struct { Changes []*KeyDiffChange `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes,omitempty"` // contains filtered or unexported fields }
func (*KeyDiffChanges) Descriptor
deprecated
func (*KeyDiffChanges) Descriptor() ([]byte, []int)
Deprecated: Use KeyDiffChanges.ProtoReflect.Descriptor instead.
func (*KeyDiffChanges) GetChanges ¶
func (x *KeyDiffChanges) GetChanges() []*KeyDiffChange
func (*KeyDiffChanges) ProtoMessage ¶
func (*KeyDiffChanges) ProtoMessage()
func (*KeyDiffChanges) ProtoReflect ¶
func (x *KeyDiffChanges) ProtoReflect() protoreflect.Message
func (*KeyDiffChanges) Reset ¶
func (x *KeyDiffChanges) Reset()
func (*KeyDiffChanges) String ¶
func (x *KeyDiffChanges) String() string
type KeyDiffOverview ¶
type KeyDiffOverview struct { Inserts int64 `protobuf:"varint,1,opt,name=inserts,proto3" json:"inserts,omitempty"` Updates int64 `protobuf:"varint,2,opt,name=updates,proto3" json:"updates,omitempty"` Deletions int64 `protobuf:"varint,3,opt,name=deletions,proto3" json:"deletions,omitempty"` // contains filtered or unexported fields }
func (*KeyDiffOverview) Descriptor
deprecated
func (*KeyDiffOverview) Descriptor() ([]byte, []int)
Deprecated: Use KeyDiffOverview.ProtoReflect.Descriptor instead.
func (*KeyDiffOverview) GetDeletions ¶
func (x *KeyDiffOverview) GetDeletions() int64
func (*KeyDiffOverview) GetInserts ¶
func (x *KeyDiffOverview) GetInserts() int64
func (*KeyDiffOverview) GetUpdates ¶
func (x *KeyDiffOverview) GetUpdates() int64
func (*KeyDiffOverview) ProtoMessage ¶
func (*KeyDiffOverview) ProtoMessage()
func (*KeyDiffOverview) ProtoReflect ¶
func (x *KeyDiffOverview) ProtoReflect() protoreflect.Message
func (*KeyDiffOverview) Reset ¶
func (x *KeyDiffOverview) Reset()
func (*KeyDiffOverview) String ¶
func (x *KeyDiffOverview) String() string
type KeyDiffResult ¶ added in v0.8.0
type KeyDiff_Changes ¶
type KeyDiff_Changes struct {
Changes *KeyDiffChanges `protobuf:"bytes,1,opt,name=changes,proto3,oneof"`
}
type KeyDiff_Overview ¶
type KeyDiff_Overview struct {
Overview *KeyDiffOverview `protobuf:"bytes,2,opt,name=overview,proto3,oneof"`
}
type KeyPushServiceClient ¶
type KeyPushServiceClient interface {
SendKeyDiff(ctx context.Context, opts ...grpc.CallOption) (KeyPushService_SendKeyDiffClient, error)
}
KeyPushServiceClient is the client API for KeyPushService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewKeyPushServiceClient ¶
func NewKeyPushServiceClient(cc grpc.ClientConnInterface) KeyPushServiceClient
type KeyPushServiceServer ¶
type KeyPushServiceServer interface { SendKeyDiff(KeyPushService_SendKeyDiffServer) error // contains filtered or unexported methods }
KeyPushServiceServer is the server API for KeyPushService service. All implementations must embed UnimplementedKeyPushServiceServer for forward compatibility
type KeyPushService_SendKeyDiffClient ¶
type KeyPushService_SendKeyDiffClient interface { Send(*SendKeyDiffRequest) error CloseAndRecv() (*SendKeyDiffResponse, error) grpc.ClientStream }
type KeyPushService_SendKeyDiffServer ¶
type KeyPushService_SendKeyDiffServer interface { SendAndClose(*SendKeyDiffResponse) error Recv() (*SendKeyDiffRequest, error) grpc.ServerStream }
type SendKeyDiffRequest ¶
type SendKeyDiffRequest struct { KeyDiff *KeyDiff `protobuf:"bytes,1,opt,name=key_diff,json=keyDiff,proto3" json:"key_diff,omitempty"` // contains filtered or unexported fields }
func (*SendKeyDiffRequest) Descriptor
deprecated
func (*SendKeyDiffRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendKeyDiffRequest.ProtoReflect.Descriptor instead.
func (*SendKeyDiffRequest) GetKeyDiff ¶
func (x *SendKeyDiffRequest) GetKeyDiff() *KeyDiff
func (*SendKeyDiffRequest) ProtoMessage ¶
func (*SendKeyDiffRequest) ProtoMessage()
func (*SendKeyDiffRequest) ProtoReflect ¶
func (x *SendKeyDiffRequest) ProtoReflect() protoreflect.Message
func (*SendKeyDiffRequest) Reset ¶
func (x *SendKeyDiffRequest) Reset()
func (*SendKeyDiffRequest) String ¶
func (x *SendKeyDiffRequest) String() string
type SendKeyDiffResponse ¶
type SendKeyDiffResponse struct {
// contains filtered or unexported fields
}
func (*SendKeyDiffResponse) Descriptor
deprecated
func (*SendKeyDiffResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendKeyDiffResponse.ProtoReflect.Descriptor instead.
func (*SendKeyDiffResponse) ProtoMessage ¶
func (*SendKeyDiffResponse) ProtoMessage()
func (*SendKeyDiffResponse) ProtoReflect ¶
func (x *SendKeyDiffResponse) ProtoReflect() protoreflect.Message
func (*SendKeyDiffResponse) Reset ¶
func (x *SendKeyDiffResponse) Reset()
func (*SendKeyDiffResponse) String ¶
func (x *SendKeyDiffResponse) String() string
type UnimplementedKeyPushServiceServer ¶
type UnimplementedKeyPushServiceServer struct { }
UnimplementedKeyPushServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedKeyPushServiceServer) SendKeyDiff ¶
func (UnimplementedKeyPushServiceServer) SendKeyDiff(KeyPushService_SendKeyDiffServer) error
type UnsafeKeyPushServiceServer ¶
type UnsafeKeyPushServiceServer interface {
// contains filtered or unexported methods
}
UnsafeKeyPushServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to KeyPushServiceServer will result in compilation errors.