gosrc: include package updated time in the request header.
gddo-server: pass pdoc instead of nil in the refresh call.
The package updated time is included in the header to check if it is
recently updated when requesting from VCS. Currently we use http ETag
as a general way to compare changes, which still consumes one API
request rate when requesting from Github. However, Github accepts
conditional requests using "If-Modified-Since" to check recent updates
time without counting against the rate limit if a 304 is received.
Package document is included in the refresh call to avoid unlimited
manual refreshing. The current design to allow such refresh to force
updating the package seems unnecessary.
These changes are targeting at reducing Github API request rate in order
to give us more head room when we do batch updates to do type analysis.
Reviewed-by: Alan Donovan <firstname.lastname@example.org>
Reviewed-by: Andrew Gerrand <email@example.com>
10 files changed