kubernetes/staging/src/k8s.io/apiserver/pkg/endpoints/discovery/aggregated/etag.go

// Attaches Cache-Busting functionality to an endpoint
//   - Sets ETag header to provided hash
//   - Replies with 304 Not Modified, if If-None-Match header matches hash
//
// hash should be the value of calculateETag on object. If hash is empty, then
// the object is simply serialized without E-Tag functionality
func ServeHTTPWithETag(
	object runtime.Object,
	hash string,
	targetGV schema.GroupVersion,
	serializer runtime.NegotiatedSerializer,
	w http.ResponseWriter,
	req *http.Request,
) {}

func calculateETag(resources interface{}