Documentation
¶
Overview ¶
Package rkgrpcmeta is a middleware of grpc framework for adding metadata in RPC response
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StreamServerInterceptor ¶
func StreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor
StreamServerInterceptor Add common headers as extension style in http response. The key is defined as bellow: 1: X-Request-Id: Request id generated by interceptor. 2: X-<Prefix-App: Application name. 3: X-<Prefix>-App-Version: Version of application. 4: X-<Prefix>-App-Unix-Time: Unix time of current application. 5: X-<Prefix>-Request-Received-Time: Time of current request received by application.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor
UnaryServerInterceptor Add common headers as extension style in http response. The key is defined as bellow: 1: X-Request-Id: Request id generated by interceptor. 2: X-<Prefix-App: Application name. 3: X-<Prefix>-App-Version: Version of application. 4: X-<Prefix>-App-Unix-Time: Unix time of current application. 5: X-<Prefix>-Request-Received-Time: Time of current request received by application.
Types ¶
type Option ¶
type Option func(*optionSet)
Option option for optionSet
func WithEntryNameAndType ¶
WithEntryNameAndType Provide entry name and entry type.