keypb

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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")
)
View Source
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 IsApiContractError(err error) bool

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) Descriptor() ([]byte, []int)

Deprecated: Use KeyDiff.ProtoReflect.Descriptor instead.

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

func (*KeyDiff) Reset

func (x *KeyDiff) Reset()

func (*KeyDiff) String

func (x *KeyDiff) String() string

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

func (KeyDiffChangeType) EnumDescriptor deprecated

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

Deprecated: Use KeyDiffChangeType.Descriptor instead.

func (KeyDiffChangeType) Number

func (KeyDiffChangeType) String

func (x KeyDiffChangeType) String() string

func (KeyDiffChangeType) Type

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 KeyDiffResult struct {
	KeyDiff client.KeyDiff
	Error   error
}

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.

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

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.

Jump to

Keyboard shortcuts

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