Documentation ¶
Index ¶
- func AttachCorelToHttp(corelid *CoRelationId, req *http.Request)
- func AttachCorelToHttpFromCtx(ctx context.Context, req *http.Request)
- func GetCtxWithCorelID(ctx context.Context, corelid *CoRelationId) context.Context
- func GinSetCoRelID(c *gin.Context, corelid *CoRelationId)
- func NewCorelCtx(sessionId, app string) context.Context
- func NewCorelCtxFromCtx(ctx context.Context, sessionId, app string) context.Context
- type CoRelationId
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachCorelToHttp ¶ added in v1.0.16
func AttachCorelToHttp(corelid *CoRelationId, req *http.Request)
func AttachCorelToHttpFromCtx ¶ added in v1.0.16
func GetCtxWithCorelID ¶ added in v1.0.8
func GetCtxWithCorelID(ctx context.Context, corelid *CoRelationId) context.Context
GetCtxWithCorelID ... Will be of no use once the consumer stops copying the context.
func GinSetCoRelID ¶ added in v1.0.10
func GinSetCoRelID(c *gin.Context, corelid *CoRelationId)
GinSetCoRelID ...
func NewCorelCtx ¶ added in v1.2.2
Types ¶
type CoRelationId ¶
type CoRelationId struct { RequestID string `json:"requestID" header:"request_id"` SessionID string `json:"sessionID" header:"session_id"` Hop int `json:"hop" header:"hop"` Auth string `header:"Authorization"` IsHTTP bool OriginHost string OriginApp string JWT string User *dotJWTinfo // contains filtered or unexported fields }
CoRelationId correlationData
func GetCorelationId ¶
func GetCorelationId(ctx context.Context) (corelid *CoRelationId, err error)
GetCorelationId ...
func NewCoRelationId ¶ added in v1.2.2
func NewCoRelationId(sessionId string) *CoRelationId
func (*CoRelationId) BasicOnceMust ¶ added in v1.2.2
func (corelid *CoRelationId) BasicOnceMust()
Click to show internal directories.
Click to hide internal directories.