forked from facebookincubator/tacquito
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ctx_keys.go
44 lines (30 loc) · 1.25 KB
/
ctx_keys.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
Copyright (c) Facebook, Inc. and its affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
Use this file to store context keys
*/
package tacquito
// ContextKey is used in Request contexts
type ContextKey string
// ContextReqID ...
const ContextReqID ContextKey = "reqID"
// ContextSessionID is used to store the context for a session in Request as a wrapped context
const ContextSessionID ContextKey = "session-id"
// ContextConnRemoteAddr is used to store the net.conn remoteAddr within a session. This value would be present
// in any sub contexts that share the underlying net.conn
const ContextConnRemoteAddr ContextKey = "conn-remote-addr"
// ContextUser is used to store the username within a session.
const ContextUser ContextKey = "user"
// ContextUserMsg ...
const ContextUserMsg ContextKey = "user-msg"
// ContextRemoteAddr ...
const ContextRemoteAddr ContextKey = "rem-addr"
// ContextReqArgs for logging context arguments with replies
const ContextReqArgs ContextKey = "req-args"
// ContextAcctType ...
const ContextAcctType ContextKey = "type"
// ContextPrivLvl ...
const ContextPrivLvl ContextKey = "priv-lvl"
// ContextPort ...
const ContextPort ContextKey = "port"