import "gopkg.in/src-d/go-vitess.v1/vt/callinfo"
Package callinfo stores custom values into the Context (related to the RPC source)
callinfo.go plugin_grpc.go plugin_mysql.go
GRPCCallInfo returns an augmented context with a CallInfo structure, only for gRPC contexts.
HTMLFromContext returns that value of HTML() from the context, or "" if we're not able to recover one
MysqlCallInfo returns an augmented context with a CallInfo structure, only for Mysql contexts.
NewContext adds the provided CallInfo to the context
type CallInfo interface { // RemoteAddr is the remote address information for this rpc call. RemoteAddr() string // Username is associated with this rpc call, if any. Username() string // Text is a text version of this connection, as specifically as possible. Text() string // HTML represents this rpc call connection in a web-friendly way. HTML() template.HTML }
CallInfo is the extra data stored in the Context
FromContext returns the CallInfo value stored in ctx, if any.
Path | Synopsis |
---|---|
fakecallinfo |
Package callinfo imports 6 packages (graph) and is imported by 9 packages. Updated 2019-06-13. Refresh now. Tools for package owners.