Documentation ¶
Index ¶
- func GetTimeout(header http.Header, defaultTimeout time.Duration) time.Duration
- func NewRequestParser(r *http.Request, resolver jsonpb.AnyResolver) (grpcurl.RequestParser, error)
- func ProcessHeaders(header http.Header) []string
- type EventHandler
- func (h *EventHandler) OnReceiveHeaders(_ metadata.MD)
- func (h *EventHandler) OnReceiveResponse(message proto.Message)
- func (h *EventHandler) OnReceiveTrailers(status *status.Status, _ metadata.MD)
- func (h *EventHandler) OnResolveMethod(_ *desc.MethodDescriptor)
- func (h *EventHandler) OnSendHeaders(_ metadata.MD)
- type Method
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTimeout ¶
GetTimeout returns the timeout from the header, if not set, returns the default timeout.
func NewRequestParser ¶
func NewRequestParser(r *http.Request, resolver jsonpb.AnyResolver) (grpcurl.RequestParser, error)
NewRequestParser creates a new request parser from the given http.Request and resolver.
func ProcessHeaders ¶
ProcessHeaders builds the headers for the gateway from HTTP headers.
Types ¶
type EventHandler ¶ added in v1.4.1
func NewEventHandler ¶ added in v1.4.1
func NewEventHandler(writer io.Writer, resolver jsonpb.AnyResolver) *EventHandler
func (*EventHandler) OnReceiveHeaders ¶ added in v1.4.1
func (h *EventHandler) OnReceiveHeaders(_ metadata.MD)
func (*EventHandler) OnReceiveResponse ¶ added in v1.4.1
func (h *EventHandler) OnReceiveResponse(message proto.Message)
func (*EventHandler) OnReceiveTrailers ¶ added in v1.4.1
func (h *EventHandler) OnReceiveTrailers(status *status.Status, _ metadata.MD)
func (*EventHandler) OnResolveMethod ¶ added in v1.4.1
func (h *EventHandler) OnResolveMethod(_ *desc.MethodDescriptor)
func (*EventHandler) OnSendHeaders ¶ added in v1.4.1
func (h *EventHandler) OnSendHeaders(_ metadata.MD)
Click to show internal directories.
Click to hide internal directories.