rpc

package
v0.0.0-...-388aa53 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: Apache-2.0 Imports: 7 Imported by: 6

Documentation

Overview

Package rpc is a generated protocol buffer package.

It is generated from these files:

pb.proto

It has these top-level messages:

SearchRequest
SearchResponse
InsertRequest
InsertResponse
UpdateRequest
UpdateResponse
ErrResponse
NotLeader
StoreNotMatch
ServerIsBusy
StaleCommand
DBNotFound
StaleEpoch
RaftEntryTooLarge

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthPb = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPb   = fmt.Errorf("proto: integer overflow")
)
View Source
var MsgType_name = map[int32]string{
	0: "MsgSearchReq",
	1: "MsgSearchRsp",
	2: "MsgInsertReq",
	3: "MsgInsertRsp",
	4: "MsgUpdateReq",
	5: "MsgUpdateRsp",
	6: "MsgErrorRsp",
	7: "MsgAdmin",
}
View Source
var MsgType_value = map[string]int32{
	"MsgSearchReq": 0,
	"MsgSearchRsp": 1,
	"MsgInsertReq": 2,
	"MsgInsertRsp": 3,
	"MsgUpdateReq": 4,
	"MsgUpdateRsp": 5,
	"MsgErrorRsp":  6,
	"MsgAdmin":     7,
}

Functions

This section is empty.

Types

type DBNotFound

type DBNotFound struct {
	ID               uint64 `protobuf:"varint,1,opt,name=id" json:"id"`
	XXX_unrecognized []byte `json:"-"`
}

func (*DBNotFound) Descriptor

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

func (*DBNotFound) GetID

func (m *DBNotFound) GetID() uint64

func (*DBNotFound) Marshal

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

func (*DBNotFound) MarshalTo

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

func (*DBNotFound) ProtoMessage

func (*DBNotFound) ProtoMessage()

func (*DBNotFound) Reset

func (m *DBNotFound) Reset()

func (*DBNotFound) Size

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

func (*DBNotFound) String

func (m *DBNotFound) String() string

func (*DBNotFound) Unmarshal

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

type ErrResponse

type ErrResponse struct {
	ID                []byte             `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Message           string             `protobuf:"bytes,2,opt,name=message" json:"message"`
	NotLeader         *NotLeader         `protobuf:"bytes,3,opt,name=notLeader" json:"notLeader,omitempty"`
	DBNotFound        *DBNotFound        `protobuf:"bytes,4,opt,name=dbNotFound" json:"dbNotFound,omitempty"`
	StaleEpoch        *StaleEpoch        `protobuf:"bytes,5,opt,name=staleEpoch" json:"staleEpoch,omitempty"`
	ServerIsBusy      *ServerIsBusy      `protobuf:"bytes,6,opt,name=serverIsBusy" json:"serverIsBusy,omitempty"`
	StaleCommand      *StaleCommand      `protobuf:"bytes,7,opt,name=staleCommand" json:"staleCommand,omitempty"`
	StoreNotMatch     *StoreNotMatch     `protobuf:"bytes,8,opt,name=storeNotMatch" json:"storeNotMatch,omitempty"`
	RaftEntryTooLarge *RaftEntryTooLarge `protobuf:"bytes,9,opt,name=raftEntryTooLarge" json:"raftEntryTooLarge,omitempty"`
	XXX_unrecognized  []byte             `json:"-"`
}

ErrResponse error response

func (*ErrResponse) Descriptor

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

func (*ErrResponse) GetDBNotFound

func (m *ErrResponse) GetDBNotFound() *DBNotFound

func (*ErrResponse) GetID

func (m *ErrResponse) GetID() []byte

func (*ErrResponse) GetMessage

func (m *ErrResponse) GetMessage() string

func (*ErrResponse) GetNotLeader

func (m *ErrResponse) GetNotLeader() *NotLeader

func (*ErrResponse) GetRaftEntryTooLarge

func (m *ErrResponse) GetRaftEntryTooLarge() *RaftEntryTooLarge

func (*ErrResponse) GetServerIsBusy

func (m *ErrResponse) GetServerIsBusy() *ServerIsBusy

func (*ErrResponse) GetStaleCommand

func (m *ErrResponse) GetStaleCommand() *StaleCommand

func (*ErrResponse) GetStaleEpoch

func (m *ErrResponse) GetStaleEpoch() *StaleEpoch

func (*ErrResponse) GetStoreNotMatch

func (m *ErrResponse) GetStoreNotMatch() *StoreNotMatch

func (*ErrResponse) Marshal

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

func (*ErrResponse) MarshalTo

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

func (*ErrResponse) ProtoMessage

func (*ErrResponse) ProtoMessage()

func (*ErrResponse) Reset

func (m *ErrResponse) Reset()

func (*ErrResponse) Size

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

func (*ErrResponse) String

func (m *ErrResponse) String() string

func (*ErrResponse) Unmarshal

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

type InsertRequest

type InsertRequest struct {
	ID               []byte    `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Xbs              []float32 `protobuf:"fixed32,2,rep,name=xbs" json:"xbs,omitempty"`
	Ids              []int64   `protobuf:"varint,3,rep,name=ids" json:"ids,omitempty"`
	Offset           int64     `protobuf:"varint,4,opt,name=offset" json:"offset"`
	XXX_unrecognized []byte    `json:"-"`
}

InsertRequest insert request

func (*InsertRequest) Descriptor

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

func (*InsertRequest) GetID

func (m *InsertRequest) GetID() []byte

func (*InsertRequest) GetIds

func (m *InsertRequest) GetIds() []int64

func (*InsertRequest) GetOffset

func (m *InsertRequest) GetOffset() int64

func (*InsertRequest) GetXbs

func (m *InsertRequest) GetXbs() []float32

func (*InsertRequest) Marshal

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

func (*InsertRequest) MarshalTo

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

func (*InsertRequest) ProtoMessage

func (*InsertRequest) ProtoMessage()

func (*InsertRequest) Reset

func (m *InsertRequest) Reset()

func (*InsertRequest) Size

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

func (*InsertRequest) String

func (m *InsertRequest) String() string

func (*InsertRequest) Unmarshal

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

type InsertResponse

type InsertResponse struct {
	ID               []byte `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

InsertResponse insert response

func (*InsertResponse) Descriptor

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

func (*InsertResponse) GetID

func (m *InsertResponse) GetID() []byte

func (*InsertResponse) Marshal

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

func (*InsertResponse) MarshalTo

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

func (*InsertResponse) ProtoMessage

func (*InsertResponse) ProtoMessage()

func (*InsertResponse) Reset

func (m *InsertResponse) Reset()

func (*InsertResponse) Size

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

func (*InsertResponse) String

func (m *InsertResponse) String() string

func (*InsertResponse) Unmarshal

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

type MsgType

type MsgType int32

MsgType msg type

const (
	MsgSearchReq MsgType = 0
	MsgSearchRsp MsgType = 1
	MsgInsertReq MsgType = 2
	MsgInsertRsp MsgType = 3
	MsgUpdateReq MsgType = 4
	MsgUpdateRsp MsgType = 5
	MsgErrorRsp  MsgType = 6
	MsgAdmin     MsgType = 7
)

func (MsgType) Enum

func (x MsgType) Enum() *MsgType

func (MsgType) EnumDescriptor

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

func (MsgType) String

func (x MsgType) String() string

func (*MsgType) UnmarshalJSON

func (x *MsgType) UnmarshalJSON(data []byte) error

type NotLeader

type NotLeader struct {
	ID               uint64    `protobuf:"varint,1,opt,name=id" json:"id"`
	Leader           meta.Peer `protobuf:"bytes,2,opt,name=leader" json:"leader"`
	XXX_unrecognized []byte    `json:"-"`
}

func (*NotLeader) Descriptor

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

func (*NotLeader) GetID

func (m *NotLeader) GetID() uint64

func (*NotLeader) GetLeader

func (m *NotLeader) GetLeader() meta.Peer

func (*NotLeader) Marshal

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

func (*NotLeader) MarshalTo

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

func (*NotLeader) ProtoMessage

func (*NotLeader) ProtoMessage()

func (*NotLeader) Reset

func (m *NotLeader) Reset()

func (*NotLeader) Size

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

func (*NotLeader) String

func (m *NotLeader) String() string

func (*NotLeader) Unmarshal

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

type RaftEntryTooLarge

type RaftEntryTooLarge struct {
	ID               uint64 `protobuf:"varint,1,opt,name=id" json:"id"`
	EntrySize        uint64 `protobuf:"varint,2,opt,name=entrySize" json:"entrySize"`
	XXX_unrecognized []byte `json:"-"`
}

func (*RaftEntryTooLarge) Descriptor

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

func (*RaftEntryTooLarge) GetEntrySize

func (m *RaftEntryTooLarge) GetEntrySize() uint64

func (*RaftEntryTooLarge) GetID

func (m *RaftEntryTooLarge) GetID() uint64

func (*RaftEntryTooLarge) Marshal

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

func (*RaftEntryTooLarge) MarshalTo

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

func (*RaftEntryTooLarge) ProtoMessage

func (*RaftEntryTooLarge) ProtoMessage()

func (*RaftEntryTooLarge) Reset

func (m *RaftEntryTooLarge) Reset()

func (*RaftEntryTooLarge) Size

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

func (*RaftEntryTooLarge) String

func (m *RaftEntryTooLarge) String() string

func (*RaftEntryTooLarge) Unmarshal

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

type SearchRequest

type SearchRequest struct {
	ID               []byte    `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	DB               uint64    `protobuf:"varint,2,opt,name=db" json:"db"`
	Xq               []float32 `protobuf:"fixed32,3,rep,name=xq" json:"xq,omitempty"`
	Offset           int64     `protobuf:"varint,4,opt,name=offset" json:"offset"`
	Last             bool      `protobuf:"varint,5,opt,name=last" json:"last"`
	XXX_unrecognized []byte    `json:"-"`
}

SearchRequest search request

func (*SearchRequest) Descriptor

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

func (*SearchRequest) GetDB

func (m *SearchRequest) GetDB() uint64

func (*SearchRequest) GetID

func (m *SearchRequest) GetID() []byte

func (*SearchRequest) GetLast

func (m *SearchRequest) GetLast() bool

func (*SearchRequest) GetOffset

func (m *SearchRequest) GetOffset() int64

func (*SearchRequest) GetXq

func (m *SearchRequest) GetXq() []float32

func (*SearchRequest) Marshal

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

func (*SearchRequest) MarshalTo

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

func (*SearchRequest) ProtoMessage

func (*SearchRequest) ProtoMessage()

func (*SearchRequest) Reset

func (m *SearchRequest) Reset()

func (*SearchRequest) Size

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

func (*SearchRequest) String

func (m *SearchRequest) String() string

func (*SearchRequest) Unmarshal

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

type SearchResponse

type SearchResponse struct {
	ID               []byte    `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Distances        []float32 `protobuf:"fixed32,2,rep,name=distances" json:"distances,omitempty"`
	Xids             []int64   `protobuf:"varint,3,rep,name=xids" json:"xids,omitempty"`
	DB               uint64    `protobuf:"varint,4,opt,name=db" json:"db"`
	SearchNext       bool      `protobuf:"varint,5,opt,name=searchNext" json:"searchNext"`
	XXX_unrecognized []byte    `json:"-"`
}

SearchResponse search response

func (*SearchResponse) Descriptor

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

func (*SearchResponse) GetDB

func (m *SearchResponse) GetDB() uint64

func (*SearchResponse) GetDistances

func (m *SearchResponse) GetDistances() []float32

func (*SearchResponse) GetID

func (m *SearchResponse) GetID() []byte

func (*SearchResponse) GetSearchNext

func (m *SearchResponse) GetSearchNext() bool

func (*SearchResponse) GetXids

func (m *SearchResponse) GetXids() []int64

func (*SearchResponse) Marshal

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

func (*SearchResponse) MarshalTo

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

func (*SearchResponse) ProtoMessage

func (*SearchResponse) ProtoMessage()

func (*SearchResponse) Reset

func (m *SearchResponse) Reset()

func (*SearchResponse) Size

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

func (*SearchResponse) String

func (m *SearchResponse) String() string

func (*SearchResponse) Unmarshal

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

type ServerIsBusy

type ServerIsBusy struct {
	XXX_unrecognized []byte `json:"-"`
}

func (*ServerIsBusy) Descriptor

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

func (*ServerIsBusy) Marshal

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

func (*ServerIsBusy) MarshalTo

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

func (*ServerIsBusy) ProtoMessage

func (*ServerIsBusy) ProtoMessage()

func (*ServerIsBusy) Reset

func (m *ServerIsBusy) Reset()

func (*ServerIsBusy) Size

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

func (*ServerIsBusy) String

func (m *ServerIsBusy) String() string

func (*ServerIsBusy) Unmarshal

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

type StaleCommand

type StaleCommand struct {
	XXX_unrecognized []byte `json:"-"`
}

func (*StaleCommand) Descriptor

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

func (*StaleCommand) Marshal

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

func (*StaleCommand) MarshalTo

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

func (*StaleCommand) ProtoMessage

func (*StaleCommand) ProtoMessage()

func (*StaleCommand) Reset

func (m *StaleCommand) Reset()

func (*StaleCommand) Size

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

func (*StaleCommand) String

func (m *StaleCommand) String() string

func (*StaleCommand) Unmarshal

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

type StaleEpoch

type StaleEpoch struct {
	NewDBs           []meta.VectorDB `protobuf:"bytes,1,rep,name=newDBs" json:"newDBs"`
	XXX_unrecognized []byte          `json:"-"`
}

func (*StaleEpoch) Descriptor

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

func (*StaleEpoch) GetNewDBs

func (m *StaleEpoch) GetNewDBs() []meta.VectorDB

func (*StaleEpoch) Marshal

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

func (*StaleEpoch) MarshalTo

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

func (*StaleEpoch) ProtoMessage

func (*StaleEpoch) ProtoMessage()

func (*StaleEpoch) Reset

func (m *StaleEpoch) Reset()

func (*StaleEpoch) Size

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

func (*StaleEpoch) String

func (m *StaleEpoch) String() string

func (*StaleEpoch) Unmarshal

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

type StoreNotMatch

type StoreNotMatch struct {
	XXX_unrecognized []byte `json:"-"`
}

func (*StoreNotMatch) Descriptor

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

func (*StoreNotMatch) Marshal

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

func (*StoreNotMatch) MarshalTo

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

func (*StoreNotMatch) ProtoMessage

func (*StoreNotMatch) ProtoMessage()

func (*StoreNotMatch) Reset

func (m *StoreNotMatch) Reset()

func (*StoreNotMatch) Size

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

func (*StoreNotMatch) String

func (m *StoreNotMatch) String() string

func (*StoreNotMatch) Unmarshal

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

type UpdateRequest

type UpdateRequest struct {
	ID               []byte    `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	DB               uint64    `protobuf:"varint,2,opt,name=db" json:"db"`
	Xbs              []float32 `protobuf:"fixed32,3,rep,name=xbs" json:"xbs,omitempty"`
	Ids              []int64   `protobuf:"varint,4,rep,name=ids" json:"ids,omitempty"`
	XXX_unrecognized []byte    `json:"-"`
}

UpdateRequest insert request

func (*UpdateRequest) Descriptor

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

func (*UpdateRequest) GetDB

func (m *UpdateRequest) GetDB() uint64

func (*UpdateRequest) GetID

func (m *UpdateRequest) GetID() []byte

func (*UpdateRequest) GetIds

func (m *UpdateRequest) GetIds() []int64

func (*UpdateRequest) GetXbs

func (m *UpdateRequest) GetXbs() []float32

func (*UpdateRequest) Marshal

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

func (*UpdateRequest) MarshalTo

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

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

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

type UpdateResponse

type UpdateResponse struct {
	ID               []byte `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	XXX_unrecognized []byte `json:"-"`
}

UpdateResponse update response

func (*UpdateResponse) Descriptor

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

func (*UpdateResponse) GetID

func (m *UpdateResponse) GetID() []byte

func (*UpdateResponse) Marshal

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

func (*UpdateResponse) MarshalTo

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

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

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

Jump to

Keyboard shortcuts

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