nodesyncproto

package
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: MIT Imports: 14 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))
	ErrUnsupportedStorageType = errGroup.Register(errors.New("unsupported storage"), uint64(ErrCodes_UnsupportedStorage))
)
View Source
var (
	ErrCodes_name = map[int32]string{
		0:    "Unexpected",
		1:    "ExpectedCoordinator",
		2:    "UnsupportedStorage",
		1000: "ErrorOffset",
	}
	ErrCodes_value = map[string]int32{
		"Unexpected":          0,
		"ExpectedCoordinator": 1,
		"UnsupportedStorage":  2,
		"ErrorOffset":         1000,
	}
)

Enum value maps for ErrCodes.

View Source
var (
	ColdSyncProtocolType_name = map[int32]string{
		0: "Pogreb",
		1: "AnystoreSqlite",
	}
	ColdSyncProtocolType_value = map[string]int32{
		"Pogreb":         0,
		"AnystoreSqlite": 1,
	}
)

Enum value maps for ColdSyncProtocolType.

View Source
var File_nodesync_nodesyncproto_protos_nodesync_proto protoreflect.FileDescriptor

Functions

func DRPCRegisterNodeSync

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

Types

type ColdSyncProtocolType added in v0.5.0

type ColdSyncProtocolType int32
const (
	ColdSyncProtocolType_Pogreb         ColdSyncProtocolType = 0
	ColdSyncProtocolType_AnystoreSqlite ColdSyncProtocolType = 1
)

func (ColdSyncProtocolType) Descriptor added in v0.7.7

func (ColdSyncProtocolType) Enum added in v0.7.7

func (ColdSyncProtocolType) EnumDescriptor deprecated added in v0.5.0

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

Deprecated: Use ColdSyncProtocolType.Descriptor instead.

func (ColdSyncProtocolType) Number added in v0.7.7

func (ColdSyncProtocolType) String added in v0.5.0

func (x ColdSyncProtocolType) String() string

func (ColdSyncProtocolType) Type added in v0.7.7

type ColdSyncRequest

type ColdSyncRequest struct {
	SpaceId      string               `protobuf:"bytes,1,opt,name=spaceId,proto3" json:"spaceId,omitempty"`
	ProtocolType ColdSyncProtocolType `protobuf:"varint,2,opt,name=protocolType,proto3,enum=anyNodeSync.ColdSyncProtocolType" json:"protocolType,omitempty"`
	// contains filtered or unexported fields
}

func (*ColdSyncRequest) Descriptor deprecated

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

Deprecated: Use ColdSyncRequest.ProtoReflect.Descriptor instead.

func (*ColdSyncRequest) GetProtocolType added in v0.5.0

func (x *ColdSyncRequest) GetProtocolType() ColdSyncProtocolType

func (*ColdSyncRequest) GetSpaceId

func (x *ColdSyncRequest) GetSpaceId() string

func (*ColdSyncRequest) MarshalToSizedBufferVT added in v0.7.7

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

func (*ColdSyncRequest) MarshalToVT added in v0.7.7

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

func (*ColdSyncRequest) MarshalVT added in v0.7.7

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

func (*ColdSyncRequest) ProtoMessage

func (*ColdSyncRequest) ProtoMessage()

func (*ColdSyncRequest) ProtoReflect added in v0.7.7

func (x *ColdSyncRequest) ProtoReflect() protoreflect.Message

func (*ColdSyncRequest) Reset

func (x *ColdSyncRequest) Reset()

func (*ColdSyncRequest) SizeVT added in v0.7.7

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

func (*ColdSyncRequest) String

func (x *ColdSyncRequest) String() string

func (*ColdSyncRequest) UnmarshalVT added in v0.7.7

func (m *ColdSyncRequest) UnmarshalVT(dAtA []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"`
	ProtocolType ColdSyncProtocolType `protobuf:"varint,5,opt,name=protocolType,proto3,enum=anyNodeSync.ColdSyncProtocolType" json:"protocolType,omitempty"`
	// contains filtered or unexported fields
}

func (*ColdSyncResponse) Descriptor deprecated

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

Deprecated: Use ColdSyncResponse.ProtoReflect.Descriptor instead.

func (*ColdSyncResponse) GetCrc32

func (x *ColdSyncResponse) GetCrc32() uint32

func (*ColdSyncResponse) GetData

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

func (*ColdSyncResponse) GetFilename

func (x *ColdSyncResponse) GetFilename() string

func (*ColdSyncResponse) GetProtocolType added in v0.5.0

func (x *ColdSyncResponse) GetProtocolType() ColdSyncProtocolType

func (*ColdSyncResponse) MarshalToSizedBufferVT added in v0.7.7

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

func (*ColdSyncResponse) MarshalToVT added in v0.7.7

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

func (*ColdSyncResponse) MarshalVT added in v0.7.7

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

func (*ColdSyncResponse) ProtoMessage

func (*ColdSyncResponse) ProtoMessage()

func (*ColdSyncResponse) ProtoReflect added in v0.7.7

func (x *ColdSyncResponse) ProtoReflect() protoreflect.Message

func (*ColdSyncResponse) Reset

func (x *ColdSyncResponse) Reset()

func (*ColdSyncResponse) SizeVT added in v0.7.7

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

func (*ColdSyncResponse) String

func (x *ColdSyncResponse) String() string

func (*ColdSyncResponse) UnmarshalVT added in v0.7.7

func (m *ColdSyncResponse) UnmarshalVT(dAtA []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_UnsupportedStorage  ErrCodes = 2
	ErrCodes_ErrorOffset         ErrCodes = 1000
)

func (ErrCodes) Descriptor added in v0.7.7

func (ErrCodes) Descriptor() protoreflect.EnumDescriptor

func (ErrCodes) Enum added in v0.7.7

func (x ErrCodes) Enum() *ErrCodes

func (ErrCodes) EnumDescriptor deprecated

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

Deprecated: Use ErrCodes.Descriptor instead.

func (ErrCodes) Number added in v0.7.7

func (x ErrCodes) Number() protoreflect.EnumNumber

func (ErrCodes) String

func (x ErrCodes) String() string

func (ErrCodes) Type added in v0.7.7

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"`
	// contains filtered or unexported fields
}

PartitionSyncRange presenting a request for one range

func (*PartitionSyncRange) Descriptor deprecated

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

Deprecated: Use PartitionSyncRange.ProtoReflect.Descriptor instead.

func (*PartitionSyncRange) GetElements added in v0.3.9

func (x *PartitionSyncRange) GetElements() bool

func (*PartitionSyncRange) GetFrom

func (x *PartitionSyncRange) GetFrom() uint64

func (*PartitionSyncRange) GetLimit

func (x *PartitionSyncRange) GetLimit() uint32

func (*PartitionSyncRange) GetTo

func (x *PartitionSyncRange) GetTo() uint64

func (*PartitionSyncRange) MarshalToSizedBufferVT added in v0.7.7

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

func (*PartitionSyncRange) MarshalToVT added in v0.7.7

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

func (*PartitionSyncRange) MarshalVT added in v0.7.7

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

func (*PartitionSyncRange) ProtoMessage

func (*PartitionSyncRange) ProtoMessage()

func (*PartitionSyncRange) ProtoReflect added in v0.7.7

func (x *PartitionSyncRange) ProtoReflect() protoreflect.Message

func (*PartitionSyncRange) Reset

func (x *PartitionSyncRange) Reset()

func (*PartitionSyncRange) SizeVT added in v0.7.7

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

func (*PartitionSyncRange) String

func (x *PartitionSyncRange) String() string

func (*PartitionSyncRange) UnmarshalVT added in v0.7.7

func (m *PartitionSyncRange) UnmarshalVT(dAtA []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"`
	// contains filtered or unexported fields
}

HeadSyncRequest is a request for HeadSync

func (*PartitionSyncRequest) Descriptor deprecated

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

Deprecated: Use PartitionSyncRequest.ProtoReflect.Descriptor instead.

func (*PartitionSyncRequest) GetPartitionId

func (x *PartitionSyncRequest) GetPartitionId() uint64

func (*PartitionSyncRequest) GetRanges

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

func (*PartitionSyncRequest) MarshalToSizedBufferVT added in v0.7.7

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

func (*PartitionSyncRequest) MarshalToVT added in v0.7.7

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

func (*PartitionSyncRequest) MarshalVT added in v0.7.7

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

func (*PartitionSyncRequest) ProtoMessage

func (*PartitionSyncRequest) ProtoMessage()

func (*PartitionSyncRequest) ProtoReflect added in v0.7.7

func (x *PartitionSyncRequest) ProtoReflect() protoreflect.Message

func (*PartitionSyncRequest) Reset

func (x *PartitionSyncRequest) Reset()

func (*PartitionSyncRequest) SizeVT added in v0.7.7

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

func (*PartitionSyncRequest) String

func (x *PartitionSyncRequest) String() string

func (*PartitionSyncRequest) UnmarshalVT added in v0.7.7

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

type PartitionSyncResponse

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

PartitionSyncResponse is a response for HeadSync

func (*PartitionSyncResponse) Descriptor deprecated

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

Deprecated: Use PartitionSyncResponse.ProtoReflect.Descriptor instead.

func (*PartitionSyncResponse) GetResults

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

func (*PartitionSyncResponse) MarshalToSizedBufferVT added in v0.7.7

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

func (*PartitionSyncResponse) MarshalToVT added in v0.7.7

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

func (*PartitionSyncResponse) MarshalVT added in v0.7.7

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

func (*PartitionSyncResponse) ProtoMessage

func (*PartitionSyncResponse) ProtoMessage()

func (*PartitionSyncResponse) ProtoReflect added in v0.7.7

func (x *PartitionSyncResponse) ProtoReflect() protoreflect.Message

func (*PartitionSyncResponse) Reset

func (x *PartitionSyncResponse) Reset()

func (*PartitionSyncResponse) SizeVT added in v0.7.7

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

func (*PartitionSyncResponse) String

func (x *PartitionSyncResponse) String() string

func (*PartitionSyncResponse) UnmarshalVT added in v0.7.7

func (m *PartitionSyncResponse) UnmarshalVT(dAtA []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"`
	// contains filtered or unexported fields
}

PartitionSyncResult presenting a response for one range

func (*PartitionSyncResult) Descriptor deprecated

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

Deprecated: Use PartitionSyncResult.ProtoReflect.Descriptor instead.

func (*PartitionSyncResult) GetCount

func (x *PartitionSyncResult) GetCount() uint32

func (*PartitionSyncResult) GetElements

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

func (*PartitionSyncResult) GetHash

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

func (*PartitionSyncResult) MarshalToSizedBufferVT added in v0.7.7

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

func (*PartitionSyncResult) MarshalToVT added in v0.7.7

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

func (*PartitionSyncResult) MarshalVT added in v0.7.7

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

func (*PartitionSyncResult) ProtoMessage

func (*PartitionSyncResult) ProtoMessage()

func (*PartitionSyncResult) ProtoReflect added in v0.7.7

func (x *PartitionSyncResult) ProtoReflect() protoreflect.Message

func (*PartitionSyncResult) Reset

func (x *PartitionSyncResult) Reset()

func (*PartitionSyncResult) SizeVT added in v0.7.7

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

func (*PartitionSyncResult) String

func (x *PartitionSyncResult) String() string

func (*PartitionSyncResult) UnmarshalVT added in v0.7.7

func (m *PartitionSyncResult) UnmarshalVT(dAtA []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"`
	// contains filtered or unexported fields
}

PartitionSyncResultElement presenting state of one object

func (*PartitionSyncResultElement) Descriptor deprecated

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

Deprecated: Use PartitionSyncResultElement.ProtoReflect.Descriptor instead.

func (*PartitionSyncResultElement) GetHead

func (x *PartitionSyncResultElement) GetHead() string

func (*PartitionSyncResultElement) GetId

func (*PartitionSyncResultElement) MarshalToSizedBufferVT added in v0.7.7

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

func (*PartitionSyncResultElement) MarshalToVT added in v0.7.7

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

func (*PartitionSyncResultElement) MarshalVT added in v0.7.7

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

func (*PartitionSyncResultElement) ProtoMessage

func (*PartitionSyncResultElement) ProtoMessage()

func (*PartitionSyncResultElement) ProtoReflect added in v0.7.7

func (*PartitionSyncResultElement) Reset

func (x *PartitionSyncResultElement) Reset()

func (*PartitionSyncResultElement) SizeVT added in v0.7.7

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

func (*PartitionSyncResultElement) String

func (x *PartitionSyncResultElement) String() string

func (*PartitionSyncResultElement) UnmarshalVT added in v0.7.7

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

Jump to

Keyboard shortcuts

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