codes

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code interface {
	String() string
	Int() uint32
}

type TCode

type TCode uint32

A TCode is an unsigned 32-bit error code as defined in the gRPC spec.

const (
	// OK is returned on success.
	OK TCode = 0

	// Unknown is error that do not have enough error information
	Unknown TCode = 2

	// TemporaryErrors - such as network problems, server unavailability, etc.
	// retryable immediately with exponential backoff
	TempUnavailable TCode = 50

	// SystemErrors - such as misconfiguration, unavailable dependencies, etc.
	// retryable after fixing system config or restoring failed services.
	// SystemErrors fall in between 100 - 149
	SystemTokenExpired     TCode = 100
	SystemPathDoesNotExist TCode = 101

	// DataErrors - such as invalid/missing input, insufficient/corrupted payload, etc.
	// not-retryable as they are permanent errors. fix the payload and replay.
	// DataErrors fall in between 150 - 199
	DataSchemaNotFound TCode = 150
	DataInvalidInput   TCode = 151
)

func (TCode) Int

func (c TCode) Int() uint32

func (TCode) String

func (c TCode) String() string

Jump to

Keyboard shortcuts

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