( _ context.Context, req *connect.Request[pingv1.PingRequest], )
| 805 | } |
| 806 | |
| 807 | func (s *notModifiedPingServer) Ping( |
| 808 | _ context.Context, |
| 809 | req *connect.Request[pingv1.PingRequest], |
| 810 | ) (*connect.Response[pingv1.PingResponse], error) { |
| 811 | if req.HTTPMethod() == http.MethodGet && req.Header().Get("If-None-Match") == s.etag { |
| 812 | return nil, connect.NewNotModifiedError(http.Header{"Etag": []string{s.etag}}) |
| 813 | } |
| 814 | resp := connect.NewResponse(&pingv1.PingResponse{}) |
| 815 | resp.Header().Set("Etag", s.etag) |
| 816 | return resp, nil |
| 817 | } |
| 818 | |
| 819 | type assertPeerInterceptor struct { |
| 820 | tb testing.TB |
nothing calls this directly
no test coverage detected