command
Version:
v0.0.0-...-908d554
Opens a new window with list of versions in this module.
Published: Nov 2, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
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
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.