Documentation
¶
Overview ¶
Package rkmuxmeta is a middleware of mux framework for adding metadata in RPC response
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Interceptor ¶
func Interceptor(opts ...Option) mux.MiddlewareFunc
Interceptor will 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 if for middleware options while creating middleware
func WithEntryNameAndType ¶
WithEntryNameAndType provide entry name and entry type.
Click to show internal directories.
Click to hide internal directories.