grpcutil

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package grpcutil provides a bunch of utility functions to be used across the gRPC codebase.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientErrorCountInterceptor added in v0.1.0

func ClientErrorCountInterceptor(component string) []grpc.DialOption

func DialContext

func DialContext(ctx context.Context, opt *DialOption) (*grpc.ClientConn, func(), error)

DialContext 指定のオプションでgRPCクライアント接続を行い、コネクションとクリーンアップ用funcを返す

func Server added in v0.1.0

func Server(opt *ListenerOption) (*grpc.Server, net.Listener, func(), error)

Server 指定のオプションでリッスン構成をした後でリッスンし、*grpc.Serverとクリーンアップ用のfuncを返す

func ServerErrorCountInterceptor added in v0.1.0

func ServerErrorCountInterceptor(component string) []grpc.ServerOption

Types

type DialOption

type DialOption struct {
	Destination          string
	TransportCredentials credentials.TransportCredentials
	DialOpts             []grpc.DialOption
}

type ListenerOption

type ListenerOption struct {
	Address    string
	ServerOpts []grpc.ServerOption
}

Jump to

Keyboard shortcuts

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