stderror

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: GPL-3.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

View Source
const (
	AddSocks5ServerToGroupFailedErr         = "add socks5 server to group failed: %w"
	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 mieru server config file failed: %w"
	CreateServerConfigRPCClientFailedErr    = "create mieru server config RPC client failed: %w"
	CreateServerLifecycleRPCClientFailedErr = "create mieru 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"
	GetHeapProfileFailedErr                 = "get heap profile failed: %w"
	GetServerConfigFailedErr                = "get mieru server config failed: %w"
	GetServerStatusFailedErr                = "get mieru server status failed: %w"
	GetThreadDumpFailedErr                  = "get thread dump failed: %w"
	LoadClientConfigFailedErr               = "load mieru client config failed: %w"
	LoadServerConfigFailedErr               = "load mieru server config failed: %w"
	SegmentSizeTooBig                       = "segment size too big"
	ServerNotRunning                        = "mieru server daemon is not running"
	ServerNotRunningErr                     = "mieru server daemon is not running: %w"
	ServerProxyNotRunningErr                = "mieru server proxy is not running: %w"
	SetServerConfigFailedErr                = "set mieru server config failed: %w"
	StartClientFailedErr                    = "start mieru client failed: %w"
	StartCPUProfileFailedErr                = "start CPU profile failed: %w"
	StartServerProxyFailedErr               = "start mieru server proxy failed: %w"
	StopServerProxyFailedErr                = "stop mieru 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 IsClosed added in v1.12.0

func IsClosed(err error) bool

IsClosed returns true if the cause of error is connection close.

func IsConnRefused

func IsConnRefused(err error) bool

IsConnRefused returns true if the cause of error is connection refused.

func IsEOF added in v1.10.0

func IsEOF(err error) bool

IsEOF returns true if the cause of error is EOF.

func IsPermissionDenied

func IsPermissionDenied(err error) bool

IsPermissionDenied returns true if the cause of error is permission denied.

func ShouldRetry added in v1.15.0

func ShouldRetry(err error) bool

ShouldRetry returns true if the caller should retry the same operation again.

Types

type ErrorType added in v1.6.0

type ErrorType int

ErrorType provides a marker of runtime error.

const (
	NO_ERROR ErrorType = iota
	UNKNOWN_ERROR
	PROTOCOL_ERROR
	NETWORK_ERROR
	CRYPTO_ERROR
	REPLAY_ERROR
)

Jump to

Keyboard shortcuts

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