Documentation ¶
Index ¶
- Constants
- func AmqpLoader(ctx context.Context, headers amqp.Table)
- func AmqpUnloader(ctx context.Context, headers amqp.Table) context.Context
- func AttachCorelToHttp(corelid *CoRelationId, req *http.Request)
- func AttachCorelToHttpFromCtx(ctx context.Context, req *http.Request)
- func DecodeCorel(str string, dst interface{}) error
- func EncodeCorel(corelId *CoRelationId) string
- func HttpCorelLoader(ctx context.Context, header http.Header)
- func HttpCorelUnLoader(ctx context.Context, header http.Header) context.Context
- func KafkaCorelLoader(ctx context.Context, headers *[]kafka.Header)
- func KafkaCorelUnLoader(ctx context.Context, headers *[]kafka.Header) context.Context
- func NewCorelCtx(sessionId string) context.Context
- func NewCorelCtxFromCorel(corelid *CoRelationId) context.Context
- func NewCorelCtxFromCtx(ctx context.Context, sessionId string) context.Context
- func NewCorelCtxFromRequest(ctx context.Context, sessionId, requestId string) context.Context
- type CoRelationId
Constants ¶
View Source
const CtxCorelLocator corelstr = "corel"
Variables ¶
This section is empty.
Functions ¶
func AmqpLoader ¶ added in v1.2.22
unloading of corel info from ctx and loading it in kafka header
func AmqpUnloader ¶ added in v1.2.22
This will be used to load corel from kafka message's header to context unloading of corel info from header and loading it in ctx
func AttachCorelToHttp ¶ added in v1.0.16
func AttachCorelToHttp(corelid *CoRelationId, req *http.Request)
func AttachCorelToHttpFromCtx ¶ added in v1.0.16
func DecodeCorel ¶ added in v1.2.12
func EncodeCorel ¶ added in v1.2.12
func EncodeCorel(corelId *CoRelationId) string
func HttpCorelLoader ¶ added in v1.2.14
* inside header it will write `Corel`="base64 of json"
func HttpCorelUnLoader ¶ added in v1.2.14
*The below Unloader will work with gin.Context only.
func KafkaCorelLoader ¶ added in v1.2.14
unloading of corel info from ctx and loading it in kafka header
func KafkaCorelUnLoader ¶ added in v1.2.14
This will be used to load corel from kafka message's header to context unloading of corel info from header and loading it in ctx
func NewCorelCtx ¶ added in v1.2.2
This is used when the default context is used to define a new corel
func NewCorelCtxFromCorel ¶ added in v1.2.14
func NewCorelCtxFromCorel(corelid *CoRelationId) context.Context
func NewCorelCtxFromCtx ¶ added in v1.2.2
This is used to define a new corel on the context
Types ¶
type CoRelationId ¶
type CoRelationId struct { RequestId string `json:"requestId" header:"request_id"` SessionId string `json:"sessionId" header:"session_id"` Auth string `header:"Authorization"` JWT *jwtinfo AppRequestId, RequestSource string // contains filtered or unexported fields }
CoRelationId correlationData
func DecodeCorelationId ¶ added in v1.2.12
func DecodeCorelationId(encoded string) *CoRelationId
func GetCorelationId ¶
func GetCorelationId(ctx context.Context) (corelid *CoRelationId, err error)
GetCorelationId ...
func (*CoRelationId) Child ¶ added in v1.2.13
func (corelid *CoRelationId) Child() *CoRelationId
func (*CoRelationId) Enc ¶ added in v1.2.14
func (corelid *CoRelationId) Enc() string
func (*CoRelationId) GetRequestId ¶ added in v1.2.12
func (corelid *CoRelationId) GetRequestId() string
func (*CoRelationId) GetSessionId ¶ added in v1.2.12
func (corelid *CoRelationId) GetSessionId() string
func (*CoRelationId) Sibling ¶ added in v1.2.13
func (corelid *CoRelationId) Sibling() *CoRelationId
Click to show internal directories.
Click to hide internal directories.