wrap-call

command
v0.0.0-...-fabbfc5 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

README

WRAP CALL

WrapCall负责在客户端调用服务前进行包装处理,所有在WrapCall中的包装器都会被执行。

开始

运行server服务端:

go run server.go

切换终端窗口:

go run client.go

服务端窗口会打印我们在WrapCall中声明的头数据:

INFO[0020] [Hello] call-wrapped1: call-wrapped-value1    source="server.go:19"
INFO[0020] [Hello] call-wrapped2: call-wrapped-value2    source="server.go:20"

任何发起请求前的处理,都可以在Call中包装。

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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