status

package
v0.1.2-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package status provides a gRPC Status struct compatible with the Improbable gRPC-web trailers and errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Status

type Status struct {
	*js.Object
	Code     codes.Code  `js:"code"`
	Message  string      `js:"message"`
	Trailers metadata.MD `js:"trailers"`
}

Status is a gRPC-web Status.

func FromError

func FromError(err error) *Status

FromError constructs a Status from an error.

func New

func New(code codes.Code, msg string, trailers metadata.MD) *Status

New creates a new, initialized, Status.

func (Status) Error

func (s Status) Error() string

Error returns a string representation of the status

Jump to

Keyboard shortcuts

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