status

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: Apache-2.0 Imports: 4 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromGRPC

func FromGRPC(s *status.Status) error

FromGRPC returns an error class from the provided GPRC status If the status is nil or OK, this will return nil nolint: gocyclo

func HTTPCode

func HTTPCode(err error) (int, bool)

HTTPCode takes an error and returns the HTTP status code for the given error If a match is found then the second return argument will be true, otherwise it will be false. nolint: gocyclo

func ToGRPC

func ToGRPC(err error) error

ToGRPC takes the passed in error and converts it to a GRPC status error If the passed in error is already a gprc status error, then it is returned unmodified If the passed in error is nil, then a nil error is returned. nolint: gocyclo

Types

This section is empty.

Directories

Path Synopsis
Package ocstatus provides error status conversions to opencencus status trace.StatusCode
Package ocstatus provides error status conversions to opencencus status trace.StatusCode

Jump to

Keyboard shortcuts

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