grpc

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package grpc implements gRPC method handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitMetrics

func InitMetrics(reg *prometheus.Registry)

InitMetrics must be called once before using this package. It registers and initializes metrics used by this package.

func NewServer

func NewServer(appl app.Appl, cfg Config) *grpc.Server

NewServer creates and returns gRPC server.

func NewServerInt

func NewServerInt(appl app.Appl, cfg Config) *grpc.Server

NewServerInt creates and returns gRPC server.

Types

type Config

type Config struct {
	CtxShutdown Ctx // Let streaming methods use def.MergeCancel(stream.Context(), CtxShutdown).
	Cert        *tls.Certificate
}

type Ctx

type Ctx = context.Context

Ctx is a synonym for convenience.

Jump to

Keyboard shortcuts

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