nodesyncproto

package
v0.4.0-alpha.12 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnexpected          = errGroup.Register(errors.New("unexpected error"), uint64(ErrCodes_Unexpected))
	ErrExpectedCoordinator = errGroup.Register(errors.New("this request should be sent by coordinator"), uint64(ErrCodes_ExpectedCoordinator))
)
View Source
var (
	ErrInvalidLengthNodesync        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowNodesync          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupNodesync = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ErrCodes_name = map[int32]string{
	0:    "Unexpected",
	1:    "ExpectedCoordinator",
	1000: "ErrorOffset",
}
View Source
var ErrCodes_value = map[string]int32{
	"Unexpected":          0,
	"ExpectedCoordinator": 1,
	"ErrorOffset":         1000,
}

Functions

func DRPCRegisterNodeSync

func DRPCRegisterNodeSync(mux drpc.Mux, impl DRPCNodeSyncServer) error

Types

type ColdSyncRequest

type ColdSyncRequest struct {
	SpaceId string `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"`
}

func (*ColdSyncRequest) Descriptor

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

func (*ColdSyncRequest) GetSpaceId

func (m *ColdSyncRequest) GetSpaceId() string

func (*ColdSyncRequest) Marshal

func (m *ColdSyncRequest) Marshal() (dAtA []byte, err error)

func (*ColdSyncRequest) MarshalTo

func (m *ColdSyncRequest) MarshalTo(dAtA []byte) (int, error)

func (*ColdSyncRequest) MarshalToSizedBuffer

func (m *ColdSyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ColdSyncRequest) ProtoMessage

func (*ColdSyncRequest) ProtoMessage()

func (*ColdSyncRequest) Reset

func (m *ColdSyncRequest) Reset()

func (*ColdSyncRequest) Size

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

func (*ColdSyncRequest) String

func (m *ColdSyncRequest) String() string

func (*ColdSyncRequest) Unmarshal

func (m *ColdSyncRequest) Unmarshal(dAtA []byte) error

func (*ColdSyncRequest) XXX_DiscardUnknown

func (m *ColdSyncRequest) XXX_DiscardUnknown()

func (*ColdSyncRequest) XXX_Marshal

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

func (*ColdSyncRequest) XXX_Merge

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

func (*ColdSyncRequest) XXX_Size

func (m *ColdSyncRequest) XXX_Size() int

func (*ColdSyncRequest) XXX_Unmarshal

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

type ColdSyncResponse

type ColdSyncResponse struct {
	Filename string `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"`
	Data     []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Crc32    uint32 `protobuf:"varint,4,opt,name=crc32,proto3" json:"crc32,omitempty"`
}

func (*ColdSyncResponse) Descriptor

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

func (*ColdSyncResponse) GetCrc32

func (m *ColdSyncResponse) GetCrc32() uint32

func (*ColdSyncResponse) GetData

func (m *ColdSyncResponse) GetData() []byte

func (*ColdSyncResponse) GetFilename

func (m *ColdSyncResponse) GetFilename() string

func (*ColdSyncResponse) Marshal

func (m *ColdSyncResponse) Marshal() (dAtA []byte, err error)

func (*ColdSyncResponse) MarshalTo

func (m *ColdSyncResponse) MarshalTo(dAtA []byte) (int, error)

func (*ColdSyncResponse) MarshalToSizedBuffer

func (m *ColdSyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ColdSyncResponse) ProtoMessage

func (*ColdSyncResponse) ProtoMessage()

func (*ColdSyncResponse) Reset

func (m *ColdSyncResponse) Reset()

func (*ColdSyncResponse) Size

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

func (*ColdSyncResponse) String

func (m *ColdSyncResponse) String() string

func (*ColdSyncResponse) Unmarshal

func (m *ColdSyncResponse) Unmarshal(dAtA []byte) error

func (*ColdSyncResponse) XXX_DiscardUnknown

func (m *ColdSyncResponse) XXX_DiscardUnknown()

func (*ColdSyncResponse) XXX_Marshal

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

func (*ColdSyncResponse) XXX_Merge

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

func (*ColdSyncResponse) XXX_Size

func (m *ColdSyncResponse) XXX_Size() int

func (*ColdSyncResponse) XXX_Unmarshal

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

type DRPCNodeSyncClient

type DRPCNodeSyncClient interface {
	DRPCConn() drpc.Conn

	PartitionSync(ctx context.Context, in *PartitionSyncRequest) (*PartitionSyncResponse, error)
	ColdSync(ctx context.Context, in *ColdSyncRequest) (DRPCNodeSync_ColdSyncClient, error)
}

func NewDRPCNodeSyncClient

func NewDRPCNodeSyncClient(cc drpc.Conn) DRPCNodeSyncClient

type DRPCNodeSyncDescription

type DRPCNodeSyncDescription struct{}

func (DRPCNodeSyncDescription) Method

func (DRPCNodeSyncDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool)

func (DRPCNodeSyncDescription) NumMethods

func (DRPCNodeSyncDescription) NumMethods() int

type DRPCNodeSyncServer

type DRPCNodeSyncServer interface {
	PartitionSync(context.Context, *PartitionSyncRequest) (*PartitionSyncResponse, error)
	ColdSync(*ColdSyncRequest, DRPCNodeSync_ColdSyncStream) error
}

type DRPCNodeSyncUnimplementedServer

type DRPCNodeSyncUnimplementedServer struct{}

func (*DRPCNodeSyncUnimplementedServer) ColdSync

func (*DRPCNodeSyncUnimplementedServer) PartitionSync

type DRPCNodeSync_ColdSyncClient

type DRPCNodeSync_ColdSyncClient interface {
	drpc.Stream
	Recv() (*ColdSyncResponse, error)
}

type DRPCNodeSync_ColdSyncStream

type DRPCNodeSync_ColdSyncStream interface {
	drpc.Stream
	Send(*ColdSyncResponse) error
}

type DRPCNodeSync_PartitionSyncStream

type DRPCNodeSync_PartitionSyncStream interface {
	drpc.Stream
	SendAndClose(*PartitionSyncResponse) error
}

type ErrCodes

type ErrCodes int32
const (
	ErrCodes_Unexpected          ErrCodes = 0
	ErrCodes_ExpectedCoordinator ErrCodes = 1
	ErrCodes_ErrorOffset         ErrCodes = 1000
)

func (ErrCodes) EnumDescriptor

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

func (ErrCodes) String

func (x ErrCodes) String() string

type PartitionSyncRange

type PartitionSyncRange struct {
	From     uint64 `protobuf:"varint,1,opt,name=from,proto3" json:"from,omitempty"`
	To       uint64 `protobuf:"varint,2,opt,name=to,proto3" json:"to,omitempty"`
	Limit    uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	Elements bool   `protobuf:"varint,4,opt,name=elements,proto3" json:"elements,omitempty"`
}

PartitionSyncRange presenting a request for one range

func (*PartitionSyncRange) Descriptor

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

func (*PartitionSyncRange) GetElements added in v0.3.9

func (m *PartitionSyncRange) GetElements() bool

func (*PartitionSyncRange) GetFrom

func (m *PartitionSyncRange) GetFrom() uint64

func (*PartitionSyncRange) GetLimit

func (m *PartitionSyncRange) GetLimit() uint32

func (*PartitionSyncRange) GetTo

func (m *PartitionSyncRange) GetTo() uint64

func (*PartitionSyncRange) Marshal

func (m *PartitionSyncRange) Marshal() (dAtA []byte, err error)

func (*PartitionSyncRange) MarshalTo

func (m *PartitionSyncRange) MarshalTo(dAtA []byte) (int, error)

func (*PartitionSyncRange) MarshalToSizedBuffer

func (m *PartitionSyncRange) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PartitionSyncRange) ProtoMessage

func (*PartitionSyncRange) ProtoMessage()

func (*PartitionSyncRange) Reset

func (m *PartitionSyncRange) Reset()

func (*PartitionSyncRange) Size

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

func (*PartitionSyncRange) String

func (m *PartitionSyncRange) String() string

func (*PartitionSyncRange) Unmarshal

func (m *PartitionSyncRange) Unmarshal(dAtA []byte) error

func (*PartitionSyncRange) XXX_DiscardUnknown

func (m *PartitionSyncRange) XXX_DiscardUnknown()

func (*PartitionSyncRange) XXX_Marshal

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

func (*PartitionSyncRange) XXX_Merge

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

func (*PartitionSyncRange) XXX_Size

func (m *PartitionSyncRange) XXX_Size() int

func (*PartitionSyncRange) XXX_Unmarshal

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

type PartitionSyncRequest

type PartitionSyncRequest struct {
	PartitionId uint64                `protobuf:"varint,1,opt,name=partitionId,proto3" json:"partitionId,omitempty"`
	Ranges      []*PartitionSyncRange `protobuf:"bytes,2,rep,name=ranges,proto3" json:"ranges,omitempty"`
}

HeadSyncRequest is a request for HeadSync

func (*PartitionSyncRequest) Descriptor

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

func (*PartitionSyncRequest) GetPartitionId

func (m *PartitionSyncRequest) GetPartitionId() uint64

func (*PartitionSyncRequest) GetRanges

func (m *PartitionSyncRequest) GetRanges() []*PartitionSyncRange

func (*PartitionSyncRequest) Marshal

func (m *PartitionSyncRequest) Marshal() (dAtA []byte, err error)

func (*PartitionSyncRequest) MarshalTo

func (m *PartitionSyncRequest) MarshalTo(dAtA []byte) (int, error)

func (*PartitionSyncRequest) MarshalToSizedBuffer

func (m *PartitionSyncRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PartitionSyncRequest) ProtoMessage

func (*PartitionSyncRequest) ProtoMessage()

func (*PartitionSyncRequest) Reset

func (m *PartitionSyncRequest) Reset()

func (*PartitionSyncRequest) Size

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

func (*PartitionSyncRequest) String

func (m *PartitionSyncRequest) String() string

func (*PartitionSyncRequest) Unmarshal

func (m *PartitionSyncRequest) Unmarshal(dAtA []byte) error

func (*PartitionSyncRequest) XXX_DiscardUnknown

func (m *PartitionSyncRequest) XXX_DiscardUnknown()

func (*PartitionSyncRequest) XXX_Marshal

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

func (*PartitionSyncRequest) XXX_Merge

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

func (*PartitionSyncRequest) XXX_Size

func (m *PartitionSyncRequest) XXX_Size() int

func (*PartitionSyncRequest) XXX_Unmarshal

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

type PartitionSyncResponse

type PartitionSyncResponse struct {
	Results []*PartitionSyncResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
}

PartitionSyncResponse is a response for HeadSync

func (*PartitionSyncResponse) Descriptor

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

func (*PartitionSyncResponse) GetResults

func (m *PartitionSyncResponse) GetResults() []*PartitionSyncResult

func (*PartitionSyncResponse) Marshal

func (m *PartitionSyncResponse) Marshal() (dAtA []byte, err error)

func (*PartitionSyncResponse) MarshalTo

func (m *PartitionSyncResponse) MarshalTo(dAtA []byte) (int, error)

func (*PartitionSyncResponse) MarshalToSizedBuffer

func (m *PartitionSyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PartitionSyncResponse) ProtoMessage

func (*PartitionSyncResponse) ProtoMessage()

func (*PartitionSyncResponse) Reset

func (m *PartitionSyncResponse) Reset()

func (*PartitionSyncResponse) Size

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

func (*PartitionSyncResponse) String

func (m *PartitionSyncResponse) String() string

func (*PartitionSyncResponse) Unmarshal

func (m *PartitionSyncResponse) Unmarshal(dAtA []byte) error

func (*PartitionSyncResponse) XXX_DiscardUnknown

func (m *PartitionSyncResponse) XXX_DiscardUnknown()

func (*PartitionSyncResponse) XXX_Marshal

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

func (*PartitionSyncResponse) XXX_Merge

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

func (*PartitionSyncResponse) XXX_Size

func (m *PartitionSyncResponse) XXX_Size() int

func (*PartitionSyncResponse) XXX_Unmarshal

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

type PartitionSyncResult

type PartitionSyncResult struct {
	Hash     []byte                        `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Elements []*PartitionSyncResultElement `protobuf:"bytes,2,rep,name=elements,proto3" json:"elements,omitempty"`
	Count    uint32                        `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
}

PartitionSyncResult presenting a response for one range

func (*PartitionSyncResult) Descriptor

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

func (*PartitionSyncResult) GetCount

func (m *PartitionSyncResult) GetCount() uint32

func (*PartitionSyncResult) GetElements

func (m *PartitionSyncResult) GetElements() []*PartitionSyncResultElement

func (*PartitionSyncResult) GetHash

func (m *PartitionSyncResult) GetHash() []byte

func (*PartitionSyncResult) Marshal

func (m *PartitionSyncResult) Marshal() (dAtA []byte, err error)

func (*PartitionSyncResult) MarshalTo

func (m *PartitionSyncResult) MarshalTo(dAtA []byte) (int, error)

func (*PartitionSyncResult) MarshalToSizedBuffer

func (m *PartitionSyncResult) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PartitionSyncResult) ProtoMessage

func (*PartitionSyncResult) ProtoMessage()

func (*PartitionSyncResult) Reset

func (m *PartitionSyncResult) Reset()

func (*PartitionSyncResult) Size

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

func (*PartitionSyncResult) String

func (m *PartitionSyncResult) String() string

func (*PartitionSyncResult) Unmarshal

func (m *PartitionSyncResult) Unmarshal(dAtA []byte) error

func (*PartitionSyncResult) XXX_DiscardUnknown

func (m *PartitionSyncResult) XXX_DiscardUnknown()

func (*PartitionSyncResult) XXX_Marshal

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

func (*PartitionSyncResult) XXX_Merge

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

func (*PartitionSyncResult) XXX_Size

func (m *PartitionSyncResult) XXX_Size() int

func (*PartitionSyncResult) XXX_Unmarshal

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

type PartitionSyncResultElement

type PartitionSyncResultElement struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Head string `protobuf:"bytes,2,opt,name=head,proto3" json:"head,omitempty"`
}

PartitionSyncResultElement presenting state of one object

func (*PartitionSyncResultElement) Descriptor

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

func (*PartitionSyncResultElement) GetHead

func (m *PartitionSyncResultElement) GetHead() string

func (*PartitionSyncResultElement) GetId

func (*PartitionSyncResultElement) Marshal

func (m *PartitionSyncResultElement) Marshal() (dAtA []byte, err error)

func (*PartitionSyncResultElement) MarshalTo

func (m *PartitionSyncResultElement) MarshalTo(dAtA []byte) (int, error)

func (*PartitionSyncResultElement) MarshalToSizedBuffer

func (m *PartitionSyncResultElement) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PartitionSyncResultElement) ProtoMessage

func (*PartitionSyncResultElement) ProtoMessage()

func (*PartitionSyncResultElement) Reset

func (m *PartitionSyncResultElement) Reset()

func (*PartitionSyncResultElement) Size

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

func (*PartitionSyncResultElement) String

func (m *PartitionSyncResultElement) String() string

func (*PartitionSyncResultElement) Unmarshal

func (m *PartitionSyncResultElement) Unmarshal(dAtA []byte) error

func (*PartitionSyncResultElement) XXX_DiscardUnknown

func (m *PartitionSyncResultElement) XXX_DiscardUnknown()

func (*PartitionSyncResultElement) XXX_Marshal

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

func (*PartitionSyncResultElement) XXX_Merge

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

func (*PartitionSyncResultElement) XXX_Size

func (m *PartitionSyncResultElement) XXX_Size() int

func (*PartitionSyncResultElement) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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