errorpb

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: Apache-2.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthErrorpb = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowErrorpb   = fmt.Errorf("proto: integer overflow")
)

Functions

func HasError added in v0.2.0

func HasError(err Error) bool

HasError returns true if is not a empty error

func Retryable added in v0.2.0

func Retryable(err Error) bool

Retryable return true meas a retryable error

Types

type Error

type Error struct {
	Message              string             `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	NotLeader            *NotLeader         `protobuf:"bytes,2,opt,name=notLeader,proto3" json:"notLeader,omitempty"`
	ShardNotFound        *ShardNotFound     `protobuf:"bytes,3,opt,name=shardNotFound,proto3" json:"shardNotFound,omitempty"`
	KeyNotInShard        *KeyNotInShard     `protobuf:"bytes,4,opt,name=KeyNotInShard,proto3" json:"KeyNotInShard,omitempty"`
	StaleEpoch           *StaleEpoch        `protobuf:"bytes,5,opt,name=staleEpoch,proto3" json:"staleEpoch,omitempty"`
	ServerIsBusy         *ServerIsBusy      `protobuf:"bytes,6,opt,name=serverIsBusy,proto3" json:"serverIsBusy,omitempty"`
	StaleCommand         *StaleCommand      `protobuf:"bytes,7,opt,name=staleCommand,proto3" json:"staleCommand,omitempty"`
	StoreNotMatch        *StoreNotMatch     `protobuf:"bytes,8,opt,name=storeNotMatch,proto3" json:"storeNotMatch,omitempty"`
	RaftEntryTooLarge    *RaftEntryTooLarge `protobuf:"bytes,9,opt,name=raftEntryTooLarge,proto3" json:"raftEntryTooLarge,omitempty"`
	ShardUnavailable     *ShardUnavailable  `protobuf:"bytes,10,opt,name=shardUnavailable,proto3" json:"shardUnavailable,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

Error is a raft error

func (*Error) Descriptor

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

func (*Error) GetKeyNotInShard

func (m *Error) GetKeyNotInShard() *KeyNotInShard

func (*Error) GetMessage

func (m *Error) GetMessage() string

func (*Error) GetNotLeader

func (m *Error) GetNotLeader() *NotLeader

func (*Error) GetRaftEntryTooLarge

func (m *Error) GetRaftEntryTooLarge() *RaftEntryTooLarge

func (*Error) GetServerIsBusy

func (m *Error) GetServerIsBusy() *ServerIsBusy

func (*Error) GetShardNotFound

func (m *Error) GetShardNotFound() *ShardNotFound

func (*Error) GetShardUnavailable added in v0.3.0

func (m *Error) GetShardUnavailable() *ShardUnavailable

func (*Error) GetStaleCommand

func (m *Error) GetStaleCommand() *StaleCommand

func (*Error) GetStaleEpoch

func (m *Error) GetStaleEpoch() *StaleEpoch

func (*Error) GetStoreNotMatch

func (m *Error) GetStoreNotMatch() *StoreNotMatch

func (*Error) Marshal

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

func (*Error) MarshalTo

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

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) Size

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

func (*Error) String

func (m *Error) String() string

func (*Error) Unmarshal

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

func (*Error) XXX_DiscardUnknown

func (m *Error) XXX_DiscardUnknown()

func (*Error) XXX_Marshal

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

func (*Error) XXX_Merge

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

func (*Error) XXX_Size

func (m *Error) XXX_Size() int

func (*Error) XXX_Unmarshal

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

type KeyNotInShard

type KeyNotInShard struct {
	Key                  []byte   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	ShardID              uint64   `protobuf:"varint,2,opt,name=shardID,proto3" json:"shardID,omitempty"`
	Start                []byte   `protobuf:"bytes,3,opt,name=start,proto3" json:"start,omitempty"`
	End                  []byte   `protobuf:"bytes,4,opt,name=end,proto3" json:"end,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

KeyNotInShard the key is not found on the store

func (*KeyNotInShard) Descriptor

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

func (*KeyNotInShard) GetEnd

func (m *KeyNotInShard) GetEnd() []byte

func (*KeyNotInShard) GetKey

func (m *KeyNotInShard) GetKey() []byte

func (*KeyNotInShard) GetShardID

func (m *KeyNotInShard) GetShardID() uint64

func (*KeyNotInShard) GetStart

func (m *KeyNotInShard) GetStart() []byte

func (*KeyNotInShard) Marshal

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

func (*KeyNotInShard) MarshalTo

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

func (*KeyNotInShard) ProtoMessage

func (*KeyNotInShard) ProtoMessage()

func (*KeyNotInShard) Reset

func (m *KeyNotInShard) Reset()

func (*KeyNotInShard) Size

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

func (*KeyNotInShard) String

func (m *KeyNotInShard) String() string

func (*KeyNotInShard) Unmarshal

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

func (*KeyNotInShard) XXX_DiscardUnknown

func (m *KeyNotInShard) XXX_DiscardUnknown()

func (*KeyNotInShard) XXX_Marshal

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

func (*KeyNotInShard) XXX_Merge

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

func (*KeyNotInShard) XXX_Size

func (m *KeyNotInShard) XXX_Size() int

func (*KeyNotInShard) XXX_Unmarshal

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

type NotLeader

type NotLeader struct {
	ShardID              uint64         `protobuf:"varint,1,opt,name=shardID,proto3" json:"shardID,omitempty"`
	Leader               metapb.Replica `protobuf:"bytes,2,opt,name=leader,proto3" json:"leader"`
	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
	XXX_unrecognized     []byte         `json:"-"`
	XXX_sizecache        int32          `json:"-"`
}

NotLeader the current shard peer is not leader

func (*NotLeader) Descriptor

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

func (*NotLeader) GetLeader

func (m *NotLeader) GetLeader() metapb.Replica

func (*NotLeader) GetShardID

func (m *NotLeader) GetShardID() uint64

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

func (*NotLeader) XXX_DiscardUnknown

func (m *NotLeader) XXX_DiscardUnknown()

func (*NotLeader) XXX_Marshal

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

func (*NotLeader) XXX_Merge

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

func (*NotLeader) XXX_Size

func (m *NotLeader) XXX_Size() int

func (*NotLeader) XXX_Unmarshal

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

type RaftEntryTooLarge

type RaftEntryTooLarge struct {
	ShardID              uint64   `protobuf:"varint,1,opt,name=shardID,proto3" json:"shardID,omitempty"`
	EntrySize            uint64   `protobuf:"varint,2,opt,name=entrySize,proto3" json:"entrySize,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

RaftEntryTooLarge raft entry is too large

func (*RaftEntryTooLarge) Descriptor

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

func (*RaftEntryTooLarge) GetEntrySize

func (m *RaftEntryTooLarge) GetEntrySize() uint64

func (*RaftEntryTooLarge) GetShardID

func (m *RaftEntryTooLarge) GetShardID() 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

func (*RaftEntryTooLarge) XXX_DiscardUnknown

func (m *RaftEntryTooLarge) XXX_DiscardUnknown()

func (*RaftEntryTooLarge) XXX_Marshal

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

func (*RaftEntryTooLarge) XXX_Merge

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

func (*RaftEntryTooLarge) XXX_Size

func (m *RaftEntryTooLarge) XXX_Size() int

func (*RaftEntryTooLarge) XXX_Unmarshal

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

type ServerIsBusy

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

ServerIsBusy the server is busy

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

func (*ServerIsBusy) XXX_DiscardUnknown

func (m *ServerIsBusy) XXX_DiscardUnknown()

func (*ServerIsBusy) XXX_Marshal

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

func (*ServerIsBusy) XXX_Merge

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

func (*ServerIsBusy) XXX_Size

func (m *ServerIsBusy) XXX_Size() int

func (*ServerIsBusy) XXX_Unmarshal

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

type ShardNotFound

type ShardNotFound struct {
	ShardID              uint64   `protobuf:"varint,1,opt,name=shardID,proto3" json:"shardID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ShardNotFound the shard replica is not found on the store

func (*ShardNotFound) Descriptor

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

func (*ShardNotFound) GetShardID

func (m *ShardNotFound) GetShardID() uint64

func (*ShardNotFound) Marshal

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

func (*ShardNotFound) MarshalTo

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

func (*ShardNotFound) ProtoMessage

func (*ShardNotFound) ProtoMessage()

func (*ShardNotFound) Reset

func (m *ShardNotFound) Reset()

func (*ShardNotFound) Size

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

func (*ShardNotFound) String

func (m *ShardNotFound) String() string

func (*ShardNotFound) Unmarshal

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

func (*ShardNotFound) XXX_DiscardUnknown

func (m *ShardNotFound) XXX_DiscardUnknown()

func (*ShardNotFound) XXX_Marshal

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

func (*ShardNotFound) XXX_Merge

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

func (*ShardNotFound) XXX_Size

func (m *ShardNotFound) XXX_Size() int

func (*ShardNotFound) XXX_Unmarshal

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

type ShardUnavailable added in v0.3.0

type ShardUnavailable struct {
	ShardID              uint64   `protobuf:"varint,1,opt,name=shardID,proto3" json:"shardID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ShardUnavailable the shard is unavailable, maybe destoryed

func (*ShardUnavailable) Descriptor added in v0.3.0

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

func (*ShardUnavailable) GetShardID added in v0.3.0

func (m *ShardUnavailable) GetShardID() uint64

func (*ShardUnavailable) Marshal added in v0.3.0

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

func (*ShardUnavailable) MarshalTo added in v0.3.0

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

func (*ShardUnavailable) ProtoMessage added in v0.3.0

func (*ShardUnavailable) ProtoMessage()

func (*ShardUnavailable) Reset added in v0.3.0

func (m *ShardUnavailable) Reset()

func (*ShardUnavailable) Size added in v0.3.0

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

func (*ShardUnavailable) String added in v0.3.0

func (m *ShardUnavailable) String() string

func (*ShardUnavailable) Unmarshal added in v0.3.0

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

func (*ShardUnavailable) XXX_DiscardUnknown added in v0.3.0

func (m *ShardUnavailable) XXX_DiscardUnknown()

func (*ShardUnavailable) XXX_Marshal added in v0.3.0

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

func (*ShardUnavailable) XXX_Merge added in v0.3.0

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

func (*ShardUnavailable) XXX_Size added in v0.3.0

func (m *ShardUnavailable) XXX_Size() int

func (*ShardUnavailable) XXX_Unmarshal added in v0.3.0

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

type StaleCommand

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

StaleCommand the command is stale, need to retry

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

func (*StaleCommand) XXX_DiscardUnknown

func (m *StaleCommand) XXX_DiscardUnknown()

func (*StaleCommand) XXX_Marshal

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

func (*StaleCommand) XXX_Merge

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

func (*StaleCommand) XXX_Size

func (m *StaleCommand) XXX_Size() int

func (*StaleCommand) XXX_Unmarshal

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

type StaleEpoch

type StaleEpoch struct {
	NewShards            []meta.Shard `protobuf:"bytes,1,rep,name=newShards,proto3" json:"newShards"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

StaleEpoch the current shard peer is stale

func (*StaleEpoch) Descriptor

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

func (*StaleEpoch) GetNewShards

func (m *StaleEpoch) GetNewShards() []meta.Shard

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

func (*StaleEpoch) XXX_DiscardUnknown

func (m *StaleEpoch) XXX_DiscardUnknown()

func (*StaleEpoch) XXX_Marshal

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

func (*StaleEpoch) XXX_Merge

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

func (*StaleEpoch) XXX_Size

func (m *StaleEpoch) XXX_Size() int

func (*StaleEpoch) XXX_Unmarshal

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

type StoreNotMatch

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

StoreNotMatch current store is not match

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

func (*StoreNotMatch) XXX_DiscardUnknown

func (m *StoreNotMatch) XXX_DiscardUnknown()

func (*StoreNotMatch) XXX_Marshal

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

func (*StoreNotMatch) XXX_Merge

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

func (*StoreNotMatch) XXX_Size

func (m *StoreNotMatch) XXX_Size() int

func (*StoreNotMatch) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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