Documentation ¶
Index ¶
- Variables
- type EventSource
- func (*EventSource) Descriptor() ([]byte, []int)deprecated
- func (x *EventSource) GetData() *any.Any
- func (x *EventSource) GetEvent() string
- func (*EventSource) ProtoMessage()
- func (x *EventSource) ProtoReflect() protoreflect.Message
- func (x *EventSource) Reset()
- func (x *EventSource) String() string
- type EventStreamError
- func (*EventStreamError) Descriptor() ([]byte, []int)deprecated
- func (x *EventStreamError) GetMessage() string
- func (x *EventStreamError) GetStatusCode() int32
- func (*EventStreamError) ProtoMessage()
- func (x *EventStreamError) ProtoReflect() protoreflect.Message
- func (x *EventStreamError) Reset()
- func (x *EventStreamError) String() string
Constants ¶
This section is empty.
Variables ¶
var File_proto_gateway_event_source_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type EventSource ¶
type EventSource struct { Event string `protobuf:"bytes,1,opt,name=event,proto3" json:"event,omitempty"` Data *any.Any `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
`EventSource` defines a protocol buffer message used to notify gRPC gateway to transcode streaming endpoints into text/event-stream content types for supporting the modern EventSource browser web API https://html.spec.whatwg.org/multipage/server-sent-events.html.
gRPC server backends that want to return text/event-stream data should be using something as follows
service SomeBackend { rpc StreamEvents(req SomeRequest) returns (stream gateway.EventSource) } message EventRequest { repeated string topics = 1; }
func (*EventSource) Descriptor
deprecated
func (*EventSource) Descriptor() ([]byte, []int)
Deprecated: Use EventSource.ProtoReflect.Descriptor instead.
func (*EventSource) GetData ¶
func (x *EventSource) GetData() *any.Any
func (*EventSource) GetEvent ¶
func (x *EventSource) GetEvent() string
func (*EventSource) ProtoMessage ¶
func (*EventSource) ProtoMessage()
func (*EventSource) ProtoReflect ¶
func (x *EventSource) ProtoReflect() protoreflect.Message
func (*EventSource) Reset ¶
func (x *EventSource) Reset()
func (*EventSource) String ¶
func (x *EventSource) String() string
type EventStreamError ¶
type EventStreamError struct { StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
`EventStreamError` represents an HTTP error to be returned in a text/event-stream response. The message should be used as the data part of the `EventSource` message.
func (*EventStreamError) Descriptor
deprecated
func (*EventStreamError) Descriptor() ([]byte, []int)
Deprecated: Use EventStreamError.ProtoReflect.Descriptor instead.
func (*EventStreamError) GetMessage ¶
func (x *EventStreamError) GetMessage() string
func (*EventStreamError) GetStatusCode ¶
func (x *EventStreamError) GetStatusCode() int32
func (*EventStreamError) ProtoMessage ¶
func (*EventStreamError) ProtoMessage()
func (*EventStreamError) ProtoReflect ¶
func (x *EventStreamError) ProtoReflect() protoreflect.Message
func (*EventStreamError) Reset ¶
func (x *EventStreamError) Reset()
func (*EventStreamError) String ¶
func (x *EventStreamError) String() string