rpcerrs

package
v1.112.0-rc Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

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

Log consolidates logging of original errors with sanitization of internal errors.

func NewLog

func NewLog(wrapper *errs.Class, log *zap.Logger, codeMap StatusMap) *Log

NewLog creates a new Log.

func (*Log) Error

func (sanitizer *Log) Error(msg string, err error) error

Error logs the message and error to the logger and returns the mapped rpcstatus code.

type StatusMap

type StatusMap map[*errs.Class]rpcstatus.StatusCode

StatusMap is used to apply the correct rpc status code to error classes.

Jump to

Keyboard shortcuts

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