base

package
v0.0.0-...-cb9a697 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoUnusedProtection__ int

Functions

func GetResponseError

func GetResponseError(resp interface{}) error

`resp` is the thrift-generated response struct of RPC.

func NewRocksDBErrFromInt

func NewRocksDBErrFromInt(e int32) error

Types

type Blob

type Blob struct {
	Data []byte
}

func NewBlob

func NewBlob() *Blob

func (*Blob) Read

func (b *Blob) Read(iprot thrift.TProtocol) error

func (*Blob) String

func (b *Blob) String() string

func (*Blob) Write

func (b *Blob) Write(oprot thrift.TProtocol) error

type DsnErrCode

type DsnErrCode int32
const (
	ERR_OK DsnErrCode = iota
	ERR_UNKNOWN
	ERR_REPLICATION_FAILURE
	ERR_APP_EXIST
	ERR_APP_NOT_EXIST
	ERR_APP_DROPPED
	ERR_BUSY_CREATING
	ERR_BUSY_DROPPING
	ERR_EXPIRED
	ERR_LOCK_ALREADY_EXIST
	ERR_HOLD_BY_OTHERS
	ERR_RECURSIVE_LOCK
	ERR_NO_OWNER
	ERR_NODE_ALREADY_EXIST
	ERR_INCONSISTENT_STATE
	ERR_ARRAY_INDEX_OUT_OF_RANGE
	ERR_SERVICE_NOT_FOUND
	ERR_SERVICE_ALREADY_RUNNING
	ERR_IO_PENDING
	ERR_TIMEOUT
	ERR_SERVICE_NOT_ACTIVE
	ERR_BUSY
	ERR_NETWORK_INIT_FAILED
	ERR_FORWARD_TO_OTHERS
	ERR_OBJECT_NOT_FOUND
	ERR_HANDLER_NOT_FOUND
	ERR_LEARN_FILE_FAILED
	ERR_GET_LEARN_STATE_FAILED
	ERR_INVALID_VERSION
	ERR_INVALID_PARAMETERS
	ERR_CAPACITY_EXCEEDED
	ERR_INVALID_STATE
	ERR_INACTIVE_STATE
	ERR_NOT_ENOUGH_MEMBER
	ERR_FILE_OPERATION_FAILED
	ERR_HANDLE_EOF
	ERR_WRONG_CHECKSUM
	ERR_INVALID_DATA
	ERR_INVALID_HANDLE
	ERR_INCOMPLETE_DATA
	ERR_VERSION_OUTDATED
	ERR_PATH_NOT_FOUND
	ERR_PATH_ALREADY_EXIST
	ERR_ADDRESS_ALREADY_USED
	ERR_STATE_FREEZED
	ERR_LOCAL_APP_FAILURE
	ERR_BIND_IOCP_FAILED
	ERR_NETWORK_START_FAILED
	ERR_NOT_IMPLEMENTED
	ERR_CHECKPOINT_FAILED
	ERR_WRONG_TIMING
	ERR_NO_NEED_OPERATE
	ERR_CORRUPTION
	ERR_TRY_AGAIN
	ERR_CLUSTER_NOT_FOUND
	ERR_CLUSTER_ALREADY_EXIST
	ERR_SERVICE_ALREADY_EXIST
	ERR_INJECTED
	ERR_NETWORK_FAILURE
	ERR_UNDER_RECOVERY
	ERR_OPERATION_DISABLED
	ERR_ZOOKEEPER_OPERATION
	ERR_CHILD_REGISTERED
	ERR_INGESTION_FAILED
	ERR_UNAUTHENTICATED
	ERR_KRB5_INTERNAL
	ERR_SASL_INTERNAL
	ERR_SASL_INCOMPLETE
	ERR_ACL_DENY
	ERR_SPLITTING
	ERR_PARENT_PARTITION_MISUSED
	ERR_CHILD_NOT_READY
	ERR_DISK_INSUFFICIENT
)

func DsnErrCodeString

func DsnErrCodeString(s string) (DsnErrCode, error)

DsnErrCodeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func DsnErrCodeValues

func DsnErrCodeValues() []DsnErrCode

DsnErrCodeValues returns all values of the enum

func (DsnErrCode) Error

func (e DsnErrCode) Error() string

func (DsnErrCode) IsADsnErrCode

func (i DsnErrCode) IsADsnErrCode() bool

IsADsnErrCode returns "true" if the value is listed in the enum definition. "false" otherwise

func (DsnErrCode) String

func (i DsnErrCode) String() string

type ErrorCode

type ErrorCode struct {
	Errno string
}

ErrorCode / Primitive for Pegasus thrift framework.

func (*ErrorCode) AsError

func (ec *ErrorCode) AsError() error

Convert ErrorCode to error.

func (*ErrorCode) Read

func (ec *ErrorCode) Read(iprot thrift.TProtocol) (err error)

func (*ErrorCode) String

func (ec *ErrorCode) String() string

func (*ErrorCode) Write

func (ec *ErrorCode) Write(oprot thrift.TProtocol) error

type Gpid

type Gpid struct {
	Appid, PartitionIndex int32
}

func (*Gpid) Read

func (id *Gpid) Read(iprot thrift.TProtocol) error

func (*Gpid) String

func (id *Gpid) String() string

func (*Gpid) Write

func (id *Gpid) Write(oprot thrift.TProtocol) error

type HostPort

type HostPort struct {
	// contains filtered or unexported fields
}

func NewHostPort

func NewHostPort(host string, port uint16) *HostPort

func (*HostPort) GetHost

func (r *HostPort) GetHost() string

func (*HostPort) GetHostPort

func (r *HostPort) GetHostPort() string

func (*HostPort) GetPort

func (r *HostPort) GetPort() uint16

func (*HostPort) Read

func (r *HostPort) Read(iprot thrift.TProtocol) error

func (*HostPort) String

func (r *HostPort) String() string

func (*HostPort) Write

func (r *HostPort) Write(oprot thrift.TProtocol) error

type HostPortType

type HostPortType int32
const (
	HOST_TYPE_INVALID HostPortType = iota
	HOST_TYPE_IPV4
	HOST_TYPE_GROUP
)

type RPCAddress

type RPCAddress struct {
	// contains filtered or unexported fields
}

func NewRPCAddress

func NewRPCAddress(ip net.IP, port int) *RPCAddress

func (*RPCAddress) GetAddress

func (r *RPCAddress) GetAddress() string

func (*RPCAddress) GetIP

func (r *RPCAddress) GetIP() net.IP

func (*RPCAddress) GetPort

func (r *RPCAddress) GetPort() int

func (*RPCAddress) GetRawAddress

func (r *RPCAddress) GetRawAddress() int64

func (*RPCAddress) Read

func (r *RPCAddress) Read(iprot thrift.TProtocol) error

func (*RPCAddress) String

func (r *RPCAddress) String() string

func (*RPCAddress) Write

func (r *RPCAddress) Write(oprot thrift.TProtocol) error

type RocksDBErrCode

type RocksDBErrCode int32
const (
	Ok RocksDBErrCode = iota
	NotFound
	Corruption
	NotSupported
	InvalidArgument
	IOError
	MergeInProgress
	Incomplete
	ShutdownInProgress
	TimedOut
	Aborted
	Busy
	Expired
	TryAgain
)

func RocksDBErrCodeString

func RocksDBErrCodeString(s string) (RocksDBErrCode, error)

func (RocksDBErrCode) Error

func (e RocksDBErrCode) Error() string

func (RocksDBErrCode) String

func (i RocksDBErrCode) String() string

Jump to

Keyboard shortcuts

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