type context.Context
153 uses
context (current package)
context.go#L62: type Context interface {
context.go#L208: func Background() Context {
context.go#L216: func TODO() Context {
context.go#L232: func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
context.go#L242: func newCancelCtx(parent Context) cancelCtx {
context.go#L250: func propagateCancel(parent Context, child canceler) {
context.go#L297: func parentCancelCtx(parent Context) (*cancelCtx, bool) {
context.go#L316: func removeChild(parent Context, child canceler) {
context.go#L345: Context
context.go#L381: func contextName(c Context) string {
context.go#L430: func WithDeadline(parent Context, d time.Time) (Context, CancelFunc) {
context.go#L502: func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) {
context.go#L519: func WithValue(parent Context, key, val interface{}) Context {
context.go#L535: Context
crypto/tls
tls.go#L118: func dial(ctx context.Context, netDialer *net.Dialer, network, addr string, config *Config) (*Conn, error) {
tls.go#L247: func (d *Dialer) DialContext(ctx context.Context, network, addr string) (net.Conn, error) {
net
dial.go#L118: func (d *Dialer) deadline(ctx context.Context, now time.Time) (earliest time.Time) {
dial.go#L167: func parseNetwork(ctx context.Context, network string, needsProto bool) (afnet string, proto int, err error) {
dial.go#L202: func (r *Resolver) resolveAddrList(ctx context.Context, op, network, addr string, hint Addr) (addrList, error) {
dial.go#L369: func (d *Dialer) DialContext(ctx context.Context, network, address string) (Conn, error) {
dial.go#L447: func (sd *sysDialer) dialParallel(ctx context.Context, primaries, fallbacks addrList) (Conn, error) {
dial.go#L463: startRacer := func(ctx context.Context, primary bool) {
dial.go#L521: func (sd *sysDialer) dialSerial(ctx context.Context, ras addrList) (Conn, error) {
dial.go#L565: func (sd *sysDialer) dialSingle(ctx context.Context, ra Addr) (c Conn, err error) {
dial.go#L622: func (lc *ListenConfig) Listen(ctx context.Context, network, address string) (Listener, error) {
dial.go#L652: func (lc *ListenConfig) ListenPacket(ctx context.Context, network, address string) (PacketConn, error) {
dnsclient_unix.go#L139: func (r *Resolver) exchange(ctx context.Context, server string, q dnsmessage.Question, timeout time.Duration, useTCP bool) (dnsmessage.Parser, dnsmessage.Header, error) {
dnsclient_unix.go#L236: func (r *Resolver) tryOneName(ctx context.Context, cfg *dnsConfig, name string, qtype dnsmessage.Type) (dnsmessage.Parser, string, error) {
dnsclient_unix.go#L390: func (r *Resolver) lookup(ctx context.Context, name string, qtype dnsmessage.Type) (dnsmessage.Parser, string, error) {
dnsclient_unix.go#L521: func (r *Resolver) goLookupHost(ctx context.Context, name string) (addrs []string, err error) {
dnsclient_unix.go#L525: func (r *Resolver) goLookupHostOrder(ctx context.Context, name string, order hostLookupOrder) (addrs []string, err error) {
dnsclient_unix.go#L559: func (r *Resolver) goLookupIP(ctx context.Context, host string) (addrs []IPAddr, err error) {
dnsclient_unix.go#L565: func (r *Resolver) goLookupIPCNAMEOrder(ctx context.Context, name string, order hostLookupOrder) (addrs []IPAddr, cname dnsmessage.Name, err error) {
dnsclient_unix.go#L729: func (r *Resolver) goLookupCNAME(ctx context.Context, host string) (string, error) {
dnsclient_unix.go#L740: func (r *Resolver) goLookupPTR(ctx context.Context, addr string) ([]string, error) {
fd_unix.go#L55: func (fd *netFD) connect(ctx context.Context, la, ra syscall.Sockaddr) (rsa syscall.Sockaddr, ret error) {
hook.go#L14: testHookDialTCP func(ctx context.Context, net string, laddr, raddr *TCPAddr) (*TCPConn, error)
hook.go#L18: ctx context.Context,
hook.go#L19: fn func(context.Context, string, string) ([]IPAddr, error),
iprawsock_posix.go#L115: func (sd *sysDialer) dialIP(ctx context.Context, laddr, raddr *IPAddr) (*IPConn, error) {
iprawsock_posix.go#L132: func (sl *sysListener) listenIP(ctx context.Context, laddr *IPAddr) (*IPConn, error) {
ipsock.go#L240: func (r *Resolver) internetAddrList(ctx context.Context, net, addr string) (addrList, error) {
ipsock_posix.go#L136: func internetSocket(ctx context.Context, net string, laddr, raddr sockaddr, sotype, proto int, mode string, ctrlFn func(string, string, syscall.RawConn) error) (fd *netFD, err error) {
lookup.go#L146: Dial func(ctx context.Context, network, address string) (Conn, error)
lookup.go#L175: func (r *Resolver) LookupHost(ctx context.Context, host string) (addrs []string, err error) {
lookup.go#L203: func (r *Resolver) LookupIPAddr(ctx context.Context, host string) ([]IPAddr, error) {
lookup.go#L211: func (r *Resolver) LookupIP(ctx context.Context, network, host string) ([]IP, error) {
lookup.go#L235: context.Context
lookup.go#L236: lookupValues context.Context
lookup.go#L239: var _ context.Context = (*onlyValuesCtx)(nil)
lookup.go#L255: func withUnexpiredValuesPreserved(lookupCtx context.Context) context.Context {
lookup.go#L261: func (r *Resolver) lookupIPAddr(ctx context.Context, network, host string) ([]IPAddr, error) {
lookup.go#L278: if alt, _ := ctx.Value(nettrace.LookupIPAltResolverKey{}).(func(context.Context, string, string) ([]IPAddr, error)); alt != nil {
lookup.go#L361: func (r *Resolver) LookupPort(ctx context.Context, network, service string) (port int, err error) {
lookup.go#L406: func (r *Resolver) LookupCNAME(ctx context.Context, host string) (cname string, err error) {
lookup.go#L432: func (r *Resolver) LookupSRV(ctx context.Context, service, proto, name string) (cname string, addrs []*SRV, err error) {
lookup.go#L442: func (r *Resolver) LookupMX(ctx context.Context, name string) ([]*MX, error) {
lookup.go#L452: func (r *Resolver) LookupNS(ctx context.Context, name string) ([]*NS, error) {
lookup.go#L462: func (r *Resolver) LookupTXT(ctx context.Context, name string) ([]string, error) {
lookup.go#L477: func (r *Resolver) LookupAddr(ctx context.Context, addr string) (names []string, err error) {
lookup_unix.go#L53: func lookupProtocol(_ context.Context, name string) (int, error) {
lookup_unix.go#L58: func (r *Resolver) dial(ctx context.Context, network, server string) (Conn, error) {
lookup_unix.go#L78: func (r *Resolver) lookupHost(ctx context.Context, host string) (addrs []string, err error) {
lookup_unix.go#L90: func (r *Resolver) lookupIP(ctx context.Context, network, host string) (addrs []IPAddr, err error) {
lookup_unix.go#L106: func (r *Resolver) lookupPort(ctx context.Context, network, service string) (int, error) {
lookup_unix.go#L122: func (r *Resolver) lookupCNAME(ctx context.Context, name string) (string, error) {
lookup_unix.go#L131: func (r *Resolver) lookupSRV(ctx context.Context, service, proto, name string) (string, []*SRV, error) {
lookup_unix.go#L183: func (r *Resolver) lookupMX(ctx context.Context, name string) ([]*MX, error) {
lookup_unix.go#L226: func (r *Resolver) lookupNS(ctx context.Context, name string) ([]*NS, error) {
lookup_unix.go#L267: func (r *Resolver) lookupTXT(ctx context.Context, name string) ([]string, error) {
lookup_unix.go#L322: func (r *Resolver) lookupAddr(ctx context.Context, addr string) ([]string, error) {
sock_posix.go#L18: func socket(ctx context.Context, net string, family, sotype, proto int, ipv6only bool, laddr, raddr sockaddr, ctrlFn func(string, string, syscall.RawConn) error) (fd *netFD, err error) {
sock_posix.go#L116: func (fd *netFD) dial(ctx context.Context, laddr, raddr sockaddr, ctrlFn func(string, string, syscall.RawConn) error) error {
tcpsock_posix.go#L57: func (sd *sysDialer) dialTCP(ctx context.Context, laddr, raddr *TCPAddr) (*TCPConn, error) {
tcpsock_posix.go#L64: func (sd *sysDialer) doDialTCP(ctx context.Context, laddr, raddr *TCPAddr) (*TCPConn, error) {
tcpsock_posix.go#L167: func (sl *sysListener) listenTCP(ctx context.Context, laddr *TCPAddr) (*TCPListener, error) {
udpsock_posix.go#L97: func (sd *sysDialer) dialUDP(ctx context.Context, laddr, raddr *UDPAddr) (*UDPConn, error) {
udpsock_posix.go#L105: func (sl *sysListener) listenUDP(ctx context.Context, laddr *UDPAddr) (*UDPConn, error) {
udpsock_posix.go#L113: func (sl *sysListener) listenMulticastUDP(ctx context.Context, ifi *Interface, gaddr *UDPAddr) (*UDPConn, error) {
unixsock_posix.go#L16: func unixSocket(ctx context.Context, net string, laddr, raddr sockaddr, mode string, ctrlFn func(string, string, syscall.RawConn) error) (*netFD, error) {
unixsock_posix.go#L153: func (sd *sysDialer) dialUnix(ctx context.Context, laddr, raddr *UnixAddr) (*UnixConn, error) {
unixsock_posix.go#L209: func (sl *sysListener) listenUnix(ctx context.Context, laddr *UnixAddr) (*UnixListener, error) {
unixsock_posix.go#L217: func (sl *sysListener) listenUnixgram(ctx context.Context, laddr *UnixAddr) (*UnixConn, error) {
cgo_unix.go#L59: func cgoLookupHost(ctx context.Context, name string) (hosts []string, err error, completed bool) {
cgo_unix.go#L67: func cgoLookupPort(ctx context.Context, network, service string) (port int, err error, completed bool) {
cgo_unix.go#L225: func cgoLookupIP(ctx context.Context, network, name string) (addrs []IPAddr, err error, completed bool) {
cgo_unix.go#L240: func cgoLookupCNAME(ctx context.Context, name string) (cname string, err error, completed bool) {
cgo_unix.go#L268: func cgoLookupPTR(ctx context.Context, addr string) (names []string, err error, completed bool) {
net/http
client.go#L299: func timeBeforeContextDeadline(t time.Time, ctx context.Context) bool {
h2_bundle.go#L3857: var ctx context.Context
h2_bundle.go#L3859: BaseContext() context.Context
h2_bundle.go#L3878: Context context.Context
h2_bundle.go#L3890: func (o *http2ServeConnOpts) context() context.Context {
h2_bundle.go#L4041: func http2serverConnBaseContext(c net.Conn, opts *http2ServeConnOpts) (ctx context.Context, cancel func()) {
h2_bundle.go#L4065: baseCtx context.Context
h2_bundle.go#L4146: ctx context.Context
h2_bundle.go#L7339: func (cc *http2ClientConn) Shutdown(ctx context.Context) error {
h2_bundle.go#L8939: func (cc *http2ClientConn) Ping(ctx context.Context) error {
request.go#L322: ctx context.Context
request.go#L336: func (r *Request) Context() context.Context {
request.go#L354: func (r *Request) WithContext(ctx context.Context) *Request {
request.go#L371: func (r *Request) Clone(ctx context.Context) *Request {
request.go#L853: func NewRequestWithContext(ctx context.Context, method, url string, body io.Reader) (*Request, error) {
server.go#L957: func (c *conn) readRequest(ctx context.Context) (w *response, err error) {
server.go#L1817: func (c *conn) serve(ctx context.Context) {
server.go#L2633: BaseContext func(net.Listener) context.Context
server.go#L2639: ConnContext func(ctx context.Context, c net.Conn) context.Context
server.go#L2730: func (srv *Server) Shutdown(ctx context.Context) error {
server.go#L3285: testContext context.Context
server.go#L3437: ctx context.Context
server.go#L3446: func (h initALPNRequest) BaseContext() context.Context { return h.ctx }
socks_bundle.go#L27: func (d *socksDialer) connect(ctx context.Context, c net.Conn, address string) (_ net.Addr, ctxErr error) {
socks_bundle.go#L284: ProxyDial func(context.Context, string, string) (net.Conn, error)
socks_bundle.go#L294: Authenticate func(context.Context, io.ReadWriter, socksAuthMethod) error
socks_bundle.go#L307: func (d *socksDialer) DialContext(ctx context.Context, network, address string) (net.Conn, error) {
socks_bundle.go#L343: func (d *socksDialer) DialWithConn(ctx context.Context, c net.Conn, network, address string) (net.Addr, error) {
socks_bundle.go#L443: func (up *socksUsernamePassword) Authenticate(ctx context.Context, rw io.ReadWriter, auth socksAuthMethod) error {
transport.go#L130: DialContext func(ctx context.Context, network, addr string) (net.Conn, error)
transport.go#L154: DialTLSContext func(ctx context.Context, network, addr string) (net.Conn, error)
transport.go#L252: GetProxyConnectHeader func(ctx context.Context, proxyURL *url.URL, target string) (Header, error)
transport.go#L1160: func (t *Transport) dial(ctx context.Context, network, addr string) (net.Conn, error) {
transport.go#L1183: ctx context.Context // context for dial
transport.go#L1308: func (t *Transport) customDialTLS(ctx context.Context, network, addr string) (conn net.Conn, err error) {
transport.go#L1556: func (t *Transport) dialConn(ctx context.Context, cm connectMethod) (pconn *persistConn, err error) {
net/http/httptrace
trace.go#L24: func ContextClientTrace(ctx context.Context) *ClientTrace {
trace.go#L34: func WithClientTrace(ctx context.Context, trace *ClientTrace) context.Context {
os/exec
exec.go#L136: ctx context.Context // nil means none
exec.go#L189: func CommandContext(ctx context.Context, name string, arg ...string) *Cmd {
os/signal
signal.go#L277: func NotifyContext(parent context.Context, signals ...os.Signal) (ctx context.Context, stop context.CancelFunc) {
signal.go#L299: context.Context
runtime/pprof
label.go#L27: func labelValue(ctx context.Context) labelMap {
label.go#L59: func WithLabels(ctx context.Context, labels LabelSet) context.Context {
label.go#L93: func Label(ctx context.Context, key string) (string, bool) {
label.go#L101: func ForLabels(ctx context.Context, f func(key, value string) bool) {
runtime.go#L24: func SetGoroutineLabels(ctx context.Context) {
runtime.go#L36: func Do(ctx context.Context, labels LabelSet, f func(context.Context)) {
runtime/trace
annotation.go#L38: func NewTask(pctx context.Context, taskType string) (ctx context.Context, task *Task) {
annotation.go#L65: func fromContext(ctx context.Context) *Task {
annotation.go#L95: func Log(ctx context.Context, category, message string) {
annotation.go#L101: func Logf(ctx context.Context, category, format string, args ...interface{}) {
annotation.go#L122: func WithRegion(ctx context.Context, regionType string, fn func()) {
annotation.go#L153: func StartRegion(ctx context.Context, regionType string) *Region {