| 1 | package lfshttpscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/ |
| 2 | |
| 3 | import ( |
| 4 | "contextscip-go gomod github.com/golang/go/src go1.25.0 context/" |
| 5 | "crypto/tlsscip-go gomod github.com/golang/go/src go1.25.0 `crypto/tls`/" |
| 6 | "fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/" |
| 7 | "ioscip-go gomod github.com/golang/go/src go1.25.0 io/" |
| 8 | "net/httpscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/" |
| 9 | "net/http/httptracescip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/" |
| 10 | "stringsscip-go gomod github.com/golang/go/src go1.25.0 strings/" |
| 11 | "syncscip-go gomod github.com/golang/go/src go1.25.0 sync/" |
| 12 | "sync/atomicscip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/" |
| 13 | "timescip-go gomod github.com/golang/go/src go1.25.0 time/" |
| 14 | ) |
| 15 | |
| 16 | type httpTransferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer# struct { |
| 17 | // members managed via sync/atomic must be aligned at the top of this |
| 18 | // structure (see: https://github.com/git-lfs/git-lfs/pull/2880). |
| 19 | |
| 20 | RequestBodySizescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#RequestBodySize. int64 |
| 21 | Startscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#Start. int64 |
| 22 | ResponseStartscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#ResponseStart. int64 |
| 23 | ConnStartscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#ConnStart. int64 |
| 24 | ConnEndscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#ConnEnd. int64 |
| 25 | DNSStartscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#DNSStart. int64 |
| 26 | DNSEndscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#DNSEnd. int64 |
| 27 | TLSStartscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#TLSStart. int64 |
| 28 | TLSEndscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#TLSEnd. int64 |
| 29 | URLscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#URL. string |
| 30 | Methodscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#Method. string |
| 31 | Keyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#Key. string |
| 32 | } |
| 33 | |
| 34 | type statsContextKeyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/statsContextKey# string |
| 35 | |
| 36 | const transferKeyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/transferKey. = statsContextKeyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/statsContextKey#("transfer") |
| 37 | |
| 38 | func (c *Clientscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/Client#) LogHTTPStatsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/Client#LogHTTPStats().(w ioscip-go gomod github.com/golang/go/src go1.25.0 io/.WriteCloserscip-go gomod github.com/golang/go/src go1.25.0 io/WriteCloser#) { |
| 39 | fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Fprintfscip-go gomod github.com/golang/go/src go1.25.0 fmt/Fprintf().(w, "concurrent=%d time=%d version=%s\n", c.ConcurrentTransfersscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/Client#ConcurrentTransfers., timescip-go gomod github.com/golang/go/src go1.25.0 time/.Nowscip-go gomod github.com/golang/go/src go1.25.0 time/Now().().Unixscip-go gomod github.com/golang/go/src go1.25.0 time/Time#Unix().(), UserAgentscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/UserAgent.) |
| 40 | c.httpLoggerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/Client#httpLogger. = newSyncLoggerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/newSyncLogger().(w) |
| 41 | } |
| 42 | |
| 43 | // LogStats is intended to be called after all HTTP operations for the |
| 44 | // command have finished. It dumps k/v logs, one line per httpTransfer into |
| 45 | // a log file with the current timestamp. |
| 46 | // |
| 47 | // DEPRECATED: Call LogHTTPStats() before the first HTTP request. |
| 48 | func (c *Clientscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/Client#) LogStatsscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/Client#LogStats().(out ioscip-go gomod github.com/golang/go/src go1.25.0 io/.Writerscip-go gomod github.com/golang/go/src go1.25.0 io/Writer#) {} |
| 49 | |
| 50 | // LogRequest tells the client to log the request's stats to the http log |
| 51 | // after the response body has been read. |
| 52 | func (c *Clientscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/Client#) LogRequestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/Client#LogRequest().(r *httpscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/.Requestscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/Request#, reqKey string) *httpscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/.Requestscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/Request# { |
| 53 | if c.httpLoggerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/Client#httpLogger. == nil { |
| 54 | return r |
| 55 | } |
| 56 | |
| 57 | t := &httpTransferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#{ |
| 58 | URLscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#URL.: stringsscip-go gomod github.com/golang/go/src go1.25.0 strings/.SplitNscip-go gomod github.com/golang/go/src go1.25.0 strings/SplitN().(r.URLscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/Request#URL..Stringscip-go gomod github.com/golang/go/src go1.25.0 `net/url`/URL#String().(), "?", 2)[0], |
| 59 | Methodscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#Method.: r.Methodscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/Request#Method., |
| 60 | Keyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#Key.: reqKey, |
| 61 | } |
| 62 | |
| 63 | ctx := httptracescip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/.WithClientTracescip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/WithClientTrace().(r.Contextscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/Request#Context().(), &httptracescip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/.ClientTracescip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/ClientTrace#{ |
| 64 | GetConnscip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/ClientTrace#GetConn.: func(_ string) { |
| 65 | atomicscip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/.CompareAndSwapInt64scip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/CompareAndSwapInt64().(&t.Startscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#Start., 0, timescip-go gomod github.com/golang/go/src go1.25.0 time/.Nowscip-go gomod github.com/golang/go/src go1.25.0 time/Now().().UnixNanoscip-go gomod github.com/golang/go/src go1.25.0 time/Time#UnixNano().()) |
| 66 | }, |
| 67 | DNSStartscip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/ClientTrace#DNSStart.: func(_ httptracescip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/.DNSStartInfoscip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/DNSStartInfo#) { |
| 68 | atomicscip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/.CompareAndSwapInt64scip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/CompareAndSwapInt64().(&t.DNSStartscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#DNSStart., 0, timescip-go gomod github.com/golang/go/src go1.25.0 time/.Nowscip-go gomod github.com/golang/go/src go1.25.0 time/Now().().UnixNanoscip-go gomod github.com/golang/go/src go1.25.0 time/Time#UnixNano().()) |
| 69 | }, |
| 70 | DNSDonescip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/ClientTrace#DNSDone.: func(_ httptracescip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/.DNSDoneInfoscip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/DNSDoneInfo#) { |
| 71 | atomicscip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/.CompareAndSwapInt64scip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/CompareAndSwapInt64().(&t.DNSEndscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#DNSEnd., 0, timescip-go gomod github.com/golang/go/src go1.25.0 time/.Nowscip-go gomod github.com/golang/go/src go1.25.0 time/Now().().UnixNanoscip-go gomod github.com/golang/go/src go1.25.0 time/Time#UnixNano().()) |
| 72 | }, |
| 73 | ConnectStartscip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/ClientTrace#ConnectStart.: func(_, _ string) { |
| 74 | atomicscip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/.CompareAndSwapInt64scip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/CompareAndSwapInt64().(&t.ConnStartscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#ConnStart., 0, timescip-go gomod github.com/golang/go/src go1.25.0 time/.Nowscip-go gomod github.com/golang/go/src go1.25.0 time/Now().().UnixNanoscip-go gomod github.com/golang/go/src go1.25.0 time/Time#UnixNano().()) |
| 75 | }, |
| 76 | ConnectDonescip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/ClientTrace#ConnectDone.: func(_, _ string, _ error) { |
| 77 | atomicscip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/.CompareAndSwapInt64scip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/CompareAndSwapInt64().(&t.ConnEndscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#ConnEnd., 0, timescip-go gomod github.com/golang/go/src go1.25.0 time/.Nowscip-go gomod github.com/golang/go/src go1.25.0 time/Now().().UnixNanoscip-go gomod github.com/golang/go/src go1.25.0 time/Time#UnixNano().()) |
| 78 | }, |
| 79 | TLSHandshakeStartscip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/ClientTrace#TLSHandshakeStart.: func() { |
| 80 | atomicscip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/.CompareAndSwapInt64scip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/CompareAndSwapInt64().(&t.TLSStartscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#TLSStart., 0, timescip-go gomod github.com/golang/go/src go1.25.0 time/.Nowscip-go gomod github.com/golang/go/src go1.25.0 time/Now().().UnixNanoscip-go gomod github.com/golang/go/src go1.25.0 time/Time#UnixNano().()) |
| 81 | }, |
| 82 | TLSHandshakeDonescip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/ClientTrace#TLSHandshakeDone.: func(_ tlsscip-go gomod github.com/golang/go/src go1.25.0 `crypto/tls`/.ConnectionStatescip-go gomod github.com/golang/go/src go1.25.0 `crypto/tls`/ConnectionState#, _ error) { |
| 83 | atomicscip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/.CompareAndSwapInt64scip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/CompareAndSwapInt64().(&t.TLSEndscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#TLSEnd., 0, timescip-go gomod github.com/golang/go/src go1.25.0 time/.Nowscip-go gomod github.com/golang/go/src go1.25.0 time/Now().().UnixNanoscip-go gomod github.com/golang/go/src go1.25.0 time/Time#UnixNano().()) |
| 84 | }, |
| 85 | GotFirstResponseBytescip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptrace`/ClientTrace#GotFirstResponseByte.: func() { |
| 86 | atomicscip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/.CompareAndSwapInt64scip-go gomod github.com/golang/go/src go1.25.0 `sync/atomic`/CompareAndSwapInt64().(&t.ResponseStartscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#ResponseStart., 0, timescip-go gomod github.com/golang/go/src go1.25.0 time/.Nowscip-go gomod github.com/golang/go/src go1.25.0 time/Now().().UnixNanoscip-go gomod github.com/golang/go/src go1.25.0 time/Time#UnixNano().()) |
| 87 | }, |
| 88 | }) |
| 89 | |
| 90 | return r.WithContextscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/Request#WithContext().(contextscip-go gomod github.com/golang/go/src go1.25.0 context/.WithValuescip-go gomod github.com/golang/go/src go1.25.0 context/WithValue().(ctx, transferKeyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/transferKey., t)) |
| 91 | } |
| 92 | |
| 93 | // LogResponse sends the current response stats to the http log. |
| 94 | // |
| 95 | // DEPRECATED: Use LogRequest() instead. |
| 96 | func (c *Clientscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/Client#) LogResponsescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/Client#LogResponse().(key string, res *httpscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/.Responsescip-go gomod github.com/golang/go/src go1.25.0 `net/http`/Response#) {} |
| 97 | |
| 98 | func newSyncLoggerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/newSyncLogger().(w ioscip-go gomod github.com/golang/go/src go1.25.0 io/.WriteCloserscip-go gomod github.com/golang/go/src go1.25.0 io/WriteCloser#) *syncLoggerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger# { |
| 99 | ch := make(chan string, 100) |
| 100 | wg := &syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.WaitGroupscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#{} |
| 101 | wg.Addscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Add().(1) |
| 102 | |
| 103 | go func(c chan string, w ioscip-go gomod github.com/golang/go/src go1.25.0 io/.Writerscip-go gomod github.com/golang/go/src go1.25.0 io/Writer#, wg *syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.WaitGroupscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#) { |
| 104 | for l := range c { |
| 105 | w.Writescip-go gomod github.com/golang/go/src go1.25.0 io/Writer#Write().([]byte(l)) |
| 106 | wg.Donescip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Done().() |
| 107 | } |
| 108 | }(ch, w, wg) |
| 109 | |
| 110 | return &syncLoggerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#{wscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#w.: w, chscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#ch.: ch, wgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#wg.: wg} |
| 111 | } |
| 112 | |
| 113 | type syncLoggerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger# struct { |
| 114 | wscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#w. ioscip-go gomod github.com/golang/go/src go1.25.0 io/.WriteCloserscip-go gomod github.com/golang/go/src go1.25.0 io/WriteCloser# |
| 115 | chscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#ch. chan string |
| 116 | wgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#wg. *syncscip-go gomod github.com/golang/go/src go1.25.0 sync/.WaitGroupscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup# |
| 117 | } |
| 118 | |
| 119 | func (l *syncLoggerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#) LogRequestscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#LogRequest().(req *httpscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/.Requestscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/Request#, bodySize int64) { |
| 120 | if l == nil { |
| 121 | return |
| 122 | } |
| 123 | |
| 124 | if v := req.Contextscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/Request#Context().().Valuescip-go gomod github.com/golang/go/src go1.25.0 context/Context#Value().(transferKeyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/transferKey.); v != nil { |
| 125 | l.logTransferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#logTransfer().(v.(*httpTransferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#), "request", fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.25.0 fmt/Sprintf().(" body=%d", bodySize)) |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | func (l *syncLoggerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#) LogResponsescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#LogResponse().(req *httpscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/.Requestscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/Request#, status int, bodySize int64) { |
| 130 | if l == nil { |
| 131 | return |
| 132 | } |
| 133 | |
| 134 | if v := req.Contextscip-go gomod github.com/golang/go/src go1.25.0 `net/http`/Request#Context().().Valuescip-go gomod github.com/golang/go/src go1.25.0 context/Context#Value().(transferKeyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/transferKey.); v != nil { |
| 135 | t := v.(*httpTransferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#) |
| 136 | now := timescip-go gomod github.com/golang/go/src go1.25.0 time/.Nowscip-go gomod github.com/golang/go/src go1.25.0 time/Now().().UnixNanoscip-go gomod github.com/golang/go/src go1.25.0 time/Time#UnixNano().() |
| 137 | l.logTransferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#logTransfer().(t, "response", |
| 138 | fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.25.0 fmt/Sprintf().(" status=%d body=%d conntime=%d dnstime=%d tlstime=%d restime=%d time=%d", |
| 139 | status, |
| 140 | bodySize, |
| 141 | max(t.ConnEndscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#ConnEnd.-t.ConnStartscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#ConnStart., 0), |
| 142 | max(t.DNSEndscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#DNSEnd.-t.DNSStartscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#DNSStart., 0), |
| 143 | max(t.TLSEndscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#TLSEnd.-t.TLSStartscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#TLSStart., 0), |
| 144 | max(now-t.ResponseStartscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#ResponseStart., 0), |
| 145 | max(now-t.Startscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#Start., 0), |
| 146 | )) |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | func (l *syncLoggerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#) logTransferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#logTransfer().(t *httpTransferscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#, event, extra string) { |
| 151 | l.wgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#wg..Addscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Add().(1) |
| 152 | l.chscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#ch. <- fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.25.0 fmt/Sprintf().("key=%s event=%s url=%s method=%s%s\n", |
| 153 | t.Keyscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#Key., |
| 154 | event, |
| 155 | t.URLscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#URL., |
| 156 | t.Methodscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/httpTransfer#Method., |
| 157 | extra, |
| 158 | ) |
| 159 | } |
| 160 | |
| 161 | func (l *syncLoggerscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#) Closescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#Close().() error { |
| 162 | if l == nil { |
| 163 | return nil |
| 164 | } |
| 165 | |
| 166 | l.wgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#wg..Donescip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Done().() |
| 167 | l.wgscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#wg..Waitscip-go gomod github.com/golang/go/src go1.25.0 sync/WaitGroup#Wait().() |
| 168 | return l.wscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/lfshttp`/syncLogger#w..Closescip-go gomod github.com/golang/go/src go1.25.0 io/Closer#Close().() |
| 169 | } |