grpc

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package grpc provides common tools, which can be used working with gRPC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseError

type BaseError struct {
	Message string     `json:"message"`
	BaseErr error      `json:"baseErr"`
	Status  codes.Code `json:"-"`
}

BaseError is a base gRPC error, which is used to inform clients, that something went wrong between microservices.

func (BaseError) Error

func (e BaseError) Error() string

func (BaseError) GRPCStatus

func (e BaseError) GRPCStatus() *status.Status

GRPCStatus is a member function, which is used by gRPC when converting an error into a status.

type Config

type Config struct {
	Host string
	Port int
}

Config represents gRPC config to start gRPC server.

Jump to

Keyboard shortcuts

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