Documentation ¶
Index ¶
- Constants
- func ContextWithClientCurrent(ctx context.Context) context.Context
- func ContextWithTarsCurrent(ctx context.Context) context.Context
- func GetClientHash(ctx context.Context) (isOk bool, hashType int, hashCode uint32, isHash bool)
- func GetClientIPFromContext(ctx context.Context) (string, bool)
- func GetClientPortFromContext(ctx context.Context) (string, bool)
- func GetClientTimeout(ctx context.Context) (isOk bool, timeout int, isTimeout bool)
- func GetDyeingKey(ctx context.Context) (string, bool)
- func GetDyeingUser(ctx context.Context) (string, bool)
- func GetPacketTypeFromContext(ctx context.Context) (int8, bool)
- func GetRecvPkgTsFromContext(ctx context.Context) (int64, bool)
- func GetReqStatusValue(ctx context.Context, key string) (string, bool)
- func GetRequestContext(ctx context.Context) (map[string]string, bool)
- func GetRequestStatus(ctx context.Context) (map[string]string, bool)
- func GetResponseContext(ctx context.Context) (map[string]string, bool)
- func GetResponseStatus(ctx context.Context) (map[string]string, bool)
- func GetServerIPFromContext(ctx context.Context) (string, bool)
- func GetServerPortFromContext(ctx context.Context) (string, bool)
- func SetClientHash(ctx context.Context, hashType int, hashCode uint32) bool
- func SetClientIPWithContext(ctx context.Context, IP string) bool
- func SetClientPortWithContext(ctx context.Context, port string) bool
- func SetClientTimeout(ctx context.Context, timeout int) bool
- func SetDyeingKey(ctx context.Context, dyeingKey string) bool
- func SetDyeingUser(ctx context.Context, user string) bool
- func SetPacketTypeFromContext(ctx context.Context, cPacketType int8) bool
- func SetRecvPkgTsFromContext(ctx context.Context, recvPkgTs int64) bool
- func SetReqStatusValue(ctx context.Context, key string, value string) bool
- func SetRequestContext(ctx context.Context, c map[string]string) bool
- func SetRequestStatus(ctx context.Context, s map[string]string) bool
- func SetResponseContext(ctx context.Context, c map[string]string) bool
- func SetResponseStatus(ctx context.Context, s map[string]string) bool
- func SetServerIPWithContext(ctx context.Context, IP string) bool
- func SetServerPortWithContext(ctx context.Context, port string) bool
- type ClientCurrent
- type Current
Constants ¶
const STATUS_DYED_KEY = "STATUS_DYED_KEY"
Variables ¶
This section is empty.
Functions ¶
func ContextWithClientCurrent ¶
ContextWithClientCurrent set ClientCurrent to the context.
func ContextWithTarsCurrent ¶
ContextWithTarsCurrent set TarsCurrent
func GetClientHash ¶
GetClientHash returns the client hash info
func GetClientIPFromContext ¶
GetClientIPFromContext gets the client ip from the context.
func GetClientPortFromContext ¶
GetClientPortFromContext gets the client ip from the context.
func GetClientTimeout ¶
GetClientTimeout returns the timeout sets for the client side.
func GetDyeingKey ¶
GetDyeingKey gets dyeing key from the context.
func GetDyeingUser ¶
GetDyeingUser gets dyeing user from the context.
func GetPacketTypeFromContext ¶
GetPacketTypeFromContext gets the PacketType from the context.
func GetRecvPkgTsFromContext ¶
GetRecvTsFromContext gets the recvTs from the context.
func GetReqStatusValue ¶
GetReqStatusValue get req status from current in context
func GetRequestContext ¶
GetRequestContext get request context set by user.
func GetRequestStatus ¶
GetRequestStatus get request status set by user.
func GetResponseContext ¶
GetResponseContext get response context set by user.
func GetResponseStatus ¶
GetResponseStatus get response status set by user.
func GetServerIPFromContext ¶
GetServerIPFromContext gets the server ip from the context.
func GetServerPortFromContext ¶
GetServerPortFromContext gets the server ip from the context.
func SetClientHash ¶
SetClientHash sets the client hash code and hash type
func SetClientIPWithContext ¶
SetClientIPWithContext set Client IP to the tars current.
func SetClientPortWithContext ¶
SetClientPortWithContext set client port to the tars current.
func SetClientTimeout ¶
SetClientTimeout sets the client timeout
func SetDyeingKey ¶
SetDyeingKey set dyeing key to the tars current.
func SetDyeingUser ¶
SetDyeingUser set dyeing user to the tars current.
func SetPacketTypeFromContext ¶
SetPacketTypeFromContext set PacketType to the tars current.
func SetRecvPkgTsFromContext ¶
SetRecvTsFromContext set recv Ts to the tars current.
func SetReqStatusValue ¶
SetReqStatusValue set req status of current of context
func SetRequestContext ¶
SetRequestContext set the request package' context .
func SetRequestStatus ¶
SetRequestStatus set the request package' status .
func SetResponseContext ¶
SetResponseContext set the response package' context .
func SetResponseStatus ¶
SetResponseStatus set the response package' status .
func SetServerIPWithContext ¶
SetServerIPWithContext set Server IP to the tars current.
Types ¶
type ClientCurrent ¶
type ClientCurrent struct {
// contains filtered or unexported fields
}
ClientCurrent for passing client side info for tars framework.