Documentation ¶
Index ¶
Constants ¶
View Source
const ( ClientConfigIsEmpty = "mieru client config is empty" ClientConfigNotExist = "mieru client config file doesn't exist" ClientGetActiveProfileFailedErr = "mieru client get active profile failed: %w" ClientNotRunning = "mieru client is not running" ClientNotRunningErr = "mieru client is not running: %w" CreateClientLifecycleRPCClientFailedErr = "create mieru client lifecycle RPC client failed: %w" CreateEmptyServerConfigFailedErr = "create empty mita server config file failed: %w" CreateServerConfigRPCClientFailedErr = "create mita server config RPC client failed: %w" CreateServerLifecycleRPCClientFailedErr = "create mita server lifecycle RPC client failed: %w" CreateSocks5ServerFailedErr = "create socks5 server failed: %w" DecodeHashedPasswordFailedErr = "decode hashed password failed: %w" ExitFailedErr = "process exit failed: %w" GetClientConfigFailedErr = "get mieru client config failed: %w" GetConnectionsFailedErr = "get connections failed: %w" GetHeapProfileFailedErr = "get heap profile failed: %w" GetMemoryStatisticsFailedErr = "get memory statistics failed: %w" GetMetricsFailedErr = "get metrics failed: %w" GetServerConfigFailedErr = "get mita server config failed: %w" GetServerStatusFailedErr = "get mita server status failed: %w" GetThreadDumpFailedErr = "get thread dump failed: %w" InvalidPortBindingsErr = "invalid port bindings: %w" InvalidTransportProtocol = "invalid transport protocol" IPAddressNotFound = "IP address not found from domain name %q" LookupIPFailedErr = "look up IP address failed: %w" ParseIPFailed = "parse IP address failed" ReloadServerFailedErr = "reload mita server failed: %w" SegmentSizeTooBig = "segment size too big" ServerNotRunningErr = "mita server daemon is not running: %w" ServerNotRunningWithCommand = "" /* 195-byte string literal not displayed */ ServerProxyNotRunningErr = "mita server proxy is not running: %w" SetServerConfigFailedErr = "set mita server config failed: %w" StartClientFailedErr = "start mieru client failed: %w" StartCPUProfileFailedErr = "start CPU profile failed: %w" StartServerProxyFailedErr = "start mita server proxy failed: %w" StopServerProxyFailedErr = "stop mita server proxy failed: %w" StoreClientConfigFailedErr = "store mieru client config failed: %w" ValidateFullClientConfigFailedErr = "validate full client config failed: %w" ValidateServerConfigPatchFailedErr = "validate server config patch failed: %w" )
Variables ¶
View Source
var ( ErrAlreadyExist = fmt.Errorf("ALREADY EXIST") ErrAlreadyStarted = fmt.Errorf("ALREADY STARTED") ErrDisconnected = fmt.Errorf("DISCONNECTED") ErrEmpty = fmt.Errorf("EMPTY") ErrFileNotExist = fmt.Errorf("FILE NOT EXIST") ErrFull = fmt.Errorf("FULL") ErrIDNotMatch = fmt.Errorf("ID NOT MATCH") ErrInternal = fmt.Errorf("INTERNAL") ErrInvalidArgument = fmt.Errorf("INVALID ARGUMENT") ErrInvalidOperation = fmt.Errorf("INVALID OPERATION") ErrNoEnoughData = fmt.Errorf("NO ENOUGH DATA") ErrNotFound = fmt.Errorf("NOT FOUND") ErrNotReady = fmt.Errorf("NOT READY") ErrNotRunning = fmt.Errorf("NOT RUNNING") ErrNullPointer = fmt.Errorf("NULL POINTER") ErrOutOfRange = fmt.Errorf("OUT OF RANGE") ErrTimeout = fmt.Errorf("TIMEOUT") ErrUnknownCommand = fmt.Errorf("UNKNOWN COMMAND") ErrUnsupported = fmt.Errorf("UNSUPPORTED") )
Functions ¶
func IsConnRefused ¶
IsConnRefused returns true if the cause of error is connection refused.
func IsNotReady ¶
IsNotReady returns true if the caller should retry the same operation again.
func IsPermissionDenied ¶
IsPermissionDenied returns true if the cause of error is permission denied.
Types ¶
type ErrorType ¶
type ErrorType uint8
ErrorType provides a marker of runtime error.
func GetErrorType ¶ added in v3.8.0
GetErrorType returns the type associated with an error.
type TypedError ¶ added in v3.8.0
type TypedError struct {
// contains filtered or unexported fields
}
TypedError annotates an error with a type.
func WrapErrorWithType ¶ added in v3.8.0
func WrapErrorWithType(err error, t ErrorType) TypedError
WrapErrorWithType creates a new TypedError object from an error and annotate it with a type.
func (TypedError) Error ¶ added in v3.8.0
func (e TypedError) Error() string
func (TypedError) Unwrap ¶ added in v3.8.0
func (e TypedError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.