package
Version:
v0.0.0-...-1a196e1
Opens a new window with list of versions in this module.
Published: Apr 10, 2017
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
NewMap 會接收一個基於 map 結構的中繼資料然後轉換成 gRPC 的中繼資料。
type Info struct {
ServiceName string
}
Info 是用來建立中繼資料的資訊建構體。
MD 是中繼資料的型態。
FromContext 會解析傳入的 Context 並取得、回傳其中的中繼資料。
type Metadata struct {
MD *MD
}
Metadata 呈現了一個基本的中繼資料。
New 會接收一個資訊建構體用來初始化、回傳一個新的中繼資料。
Context 會將目前的中繼資料轉換成 context.Context 以便利於傳入其他函式中。
ContextMap 會接收 map 型態的中繼資料並與目前的中繼資料合併,
然後將其轉換成 context.Context 以便利於傳入其他函式中。
Source Files
¶
Click to show internal directories.
Click to hide internal directories.