grpc

package
v0.0.0-...-5ef37d6 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

https://grpc.io/ https://grpc.io/docs/languages/go/ https://github.com/grpc/grpc-go/tree/master/Documentation https://github.com/grpc/grpc-go/tree/master/examples

The default logger is controlled by environment variables. Turn everything on like this: export GRPC_GO_LOG_VERBOSITY_LEVEL=99 export GRPC_GO_LOG_SEVERITY_LEVEL=info

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(target string) (*grpc.ClientConn, error)

Dial creates a client connection to the given target. 目标 localhost:9090 连接用完调用grpc.ClientConn.Close()关闭

func RegisterHealthServer

func RegisterHealthServer(s grpc.ServiceRegistrar)

RegisterHealthServer 注册健康检查

func Serve

func Serve(port string, f func(grpc.ServiceRegistrar)) error

Serve 监听grpc请求,为每个连接创建一个goroutine f为注册函数

Types

type ServiceRegistrar

type ServiceRegistrar = grpc.ServiceRegistrar

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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