Documentation
¶
Index ¶
- Variables
- func RegisterWebsocketHandlerServer(s grpc.ServiceRegistrar, srv WebsocketHandlerServer)
- func RegisterWebsocketServer(s grpc.ServiceRegistrar, srv WebsocketServer)
- type ClientMessage
- func (*ClientMessage) Descriptor() ([]byte, []int)deprecated
- func (m *ClientMessage) GetContent() isClientMessage_Content
- func (x *ClientMessage) GetId() string
- func (x *ClientMessage) GetRegistrationRequest() *RegistrationRequest
- func (x *ClientMessage) GetWebsocketEventResponse() *WebsocketEventResponse
- func (*ClientMessage) ProtoMessage()
- func (x *ClientMessage) ProtoReflect() protoreflect.Message
- func (x *ClientMessage) Reset()
- func (x *ClientMessage) String() string
- type ClientMessage_RegistrationRequest
- type ClientMessage_WebsocketEventResponse
- type QueryValue
- type RegistrationRequest
- func (*RegistrationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegistrationRequest) GetEventType() WebsocketEventType
- func (x *RegistrationRequest) GetSocketName() string
- func (*RegistrationRequest) ProtoMessage()
- func (x *RegistrationRequest) ProtoReflect() protoreflect.Message
- func (x *RegistrationRequest) Reset()
- func (x *RegistrationRequest) String() string
- type RegistrationResponse
- type ServerMessage
- func (*ServerMessage) Descriptor() ([]byte, []int)deprecated
- func (m *ServerMessage) GetContent() isServerMessage_Content
- func (x *ServerMessage) GetId() string
- func (x *ServerMessage) GetRegistrationResponse() *RegistrationResponse
- func (x *ServerMessage) GetWebsocketEventRequest() *WebsocketEventRequest
- func (*ServerMessage) ProtoMessage()
- func (x *ServerMessage) ProtoReflect() protoreflect.Message
- func (x *ServerMessage) Reset()
- func (x *ServerMessage) String() string
- type ServerMessage_RegistrationResponse
- type ServerMessage_WebsocketEventRequest
- type UnimplementedWebsocketHandlerServer
- type UnimplementedWebsocketServer
- func (UnimplementedWebsocketServer) CloseConnection(context.Context, *WebsocketCloseConnectionRequest) (*WebsocketCloseConnectionResponse, error)
- func (UnimplementedWebsocketServer) SendMessage(context.Context, *WebsocketSendRequest) (*WebsocketSendResponse, error)
- func (UnimplementedWebsocketServer) SocketDetails(context.Context, *WebsocketDetailsRequest) (*WebsocketDetailsResponse, error)
- type UnsafeWebsocketHandlerServer
- type UnsafeWebsocketServer
- type WebsocketClient
- type WebsocketCloseConnectionRequest
- func (*WebsocketCloseConnectionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WebsocketCloseConnectionRequest) GetConnectionId() string
- func (x *WebsocketCloseConnectionRequest) GetSocketName() string
- func (*WebsocketCloseConnectionRequest) ProtoMessage()
- func (x *WebsocketCloseConnectionRequest) ProtoReflect() protoreflect.Message
- func (x *WebsocketCloseConnectionRequest) Reset()
- func (x *WebsocketCloseConnectionRequest) String() string
- type WebsocketCloseConnectionResponse
- func (*WebsocketCloseConnectionResponse) Descriptor() ([]byte, []int)deprecated
- func (*WebsocketCloseConnectionResponse) ProtoMessage()
- func (x *WebsocketCloseConnectionResponse) ProtoReflect() protoreflect.Message
- func (x *WebsocketCloseConnectionResponse) Reset()
- func (x *WebsocketCloseConnectionResponse) String() string
- type WebsocketConnectionEvent
- func (*WebsocketConnectionEvent) Descriptor() ([]byte, []int)deprecated
- func (x *WebsocketConnectionEvent) GetQueryParams() map[string]*QueryValue
- func (*WebsocketConnectionEvent) ProtoMessage()
- func (x *WebsocketConnectionEvent) ProtoReflect() protoreflect.Message
- func (x *WebsocketConnectionEvent) Reset()
- func (x *WebsocketConnectionEvent) String() string
- type WebsocketConnectionResponse
- func (*WebsocketConnectionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WebsocketConnectionResponse) GetReject() bool
- func (*WebsocketConnectionResponse) ProtoMessage()
- func (x *WebsocketConnectionResponse) ProtoReflect() protoreflect.Message
- func (x *WebsocketConnectionResponse) Reset()
- func (x *WebsocketConnectionResponse) String() string
- type WebsocketDetailsRequest
- func (*WebsocketDetailsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WebsocketDetailsRequest) GetSocketName() string
- func (*WebsocketDetailsRequest) ProtoMessage()
- func (x *WebsocketDetailsRequest) ProtoReflect() protoreflect.Message
- func (x *WebsocketDetailsRequest) Reset()
- func (x *WebsocketDetailsRequest) String() string
- type WebsocketDetailsResponse
- func (*WebsocketDetailsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WebsocketDetailsResponse) GetUrl() string
- func (*WebsocketDetailsResponse) ProtoMessage()
- func (x *WebsocketDetailsResponse) ProtoReflect() protoreflect.Message
- func (x *WebsocketDetailsResponse) Reset()
- func (x *WebsocketDetailsResponse) String() string
- type WebsocketDisconnectionEvent
- type WebsocketEventRequest
- func (*WebsocketEventRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WebsocketEventRequest) GetConnection() *WebsocketConnectionEvent
- func (x *WebsocketEventRequest) GetConnectionId() string
- func (x *WebsocketEventRequest) GetDisconnection() *WebsocketDisconnectionEvent
- func (x *WebsocketEventRequest) GetMessage() *WebsocketMessageEvent
- func (x *WebsocketEventRequest) GetSocketName() string
- func (m *WebsocketEventRequest) GetWebsocketEvent() isWebsocketEventRequest_WebsocketEvent
- func (*WebsocketEventRequest) ProtoMessage()
- func (x *WebsocketEventRequest) ProtoReflect() protoreflect.Message
- func (x *WebsocketEventRequest) Reset()
- func (x *WebsocketEventRequest) String() string
- type WebsocketEventRequest_Connection
- type WebsocketEventRequest_Disconnection
- type WebsocketEventRequest_Message
- type WebsocketEventResponse
- func (*WebsocketEventResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WebsocketEventResponse) GetConnectionResponse() *WebsocketConnectionResponse
- func (m *WebsocketEventResponse) GetWebsocketResponse() isWebsocketEventResponse_WebsocketResponse
- func (*WebsocketEventResponse) ProtoMessage()
- func (x *WebsocketEventResponse) ProtoReflect() protoreflect.Message
- func (x *WebsocketEventResponse) Reset()
- func (x *WebsocketEventResponse) String() string
- type WebsocketEventResponse_ConnectionResponse
- type WebsocketEventType
- func (WebsocketEventType) Descriptor() protoreflect.EnumDescriptor
- func (x WebsocketEventType) Enum() *WebsocketEventType
- func (WebsocketEventType) EnumDescriptor() ([]byte, []int)deprecated
- func (x WebsocketEventType) Number() protoreflect.EnumNumber
- func (x WebsocketEventType) String() string
- func (WebsocketEventType) Type() protoreflect.EnumType
- type WebsocketHandlerClient
- type WebsocketHandlerServer
- type WebsocketHandler_HandleEventsClient
- type WebsocketHandler_HandleEventsServer
- type WebsocketMessageEvent
- func (*WebsocketMessageEvent) Descriptor() ([]byte, []int)deprecated
- func (x *WebsocketMessageEvent) GetBody() []byte
- func (*WebsocketMessageEvent) ProtoMessage()
- func (x *WebsocketMessageEvent) ProtoReflect() protoreflect.Message
- func (x *WebsocketMessageEvent) Reset()
- func (x *WebsocketMessageEvent) String() string
- type WebsocketSendRequest
- func (*WebsocketSendRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WebsocketSendRequest) GetConnectionId() string
- func (x *WebsocketSendRequest) GetData() []byte
- func (x *WebsocketSendRequest) GetSocketName() string
- func (*WebsocketSendRequest) ProtoMessage()
- func (x *WebsocketSendRequest) ProtoReflect() protoreflect.Message
- func (x *WebsocketSendRequest) Reset()
- func (x *WebsocketSendRequest) String() string
- type WebsocketSendResponse
- type WebsocketServer
Constants ¶
This section is empty.
Variables ¶
var ( WebsocketEventType_name = map[int32]string{ 0: "Connect", 1: "Disconnect", 2: "Message", } WebsocketEventType_value = map[string]int32{ "Connect": 0, "Disconnect": 1, "Message": 2, } )
Enum value maps for WebsocketEventType.
var File_nitric_proto_websockets_v1_websockets_proto protoreflect.FileDescriptor
var WebsocketHandler_ServiceDesc = grpc.ServiceDesc{ ServiceName: "nitric.proto.websockets.v1.WebsocketHandler", HandlerType: (*WebsocketHandlerServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "HandleEvents", Handler: _WebsocketHandler_HandleEvents_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "nitric/proto/websockets/v1/websockets.proto", }
WebsocketHandler_ServiceDesc is the grpc.ServiceDesc for WebsocketHandler service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var Websocket_ServiceDesc = grpc.ServiceDesc{ ServiceName: "nitric.proto.websockets.v1.Websocket", HandlerType: (*WebsocketServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendMessage", Handler: _Websocket_SendMessage_Handler, }, { MethodName: "CloseConnection", Handler: _Websocket_CloseConnection_Handler, }, { MethodName: "SocketDetails", Handler: _Websocket_SocketDetails_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "nitric/proto/websockets/v1/websockets.proto", }
Websocket_ServiceDesc is the grpc.ServiceDesc for Websocket service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterWebsocketHandlerServer ¶
func RegisterWebsocketHandlerServer(s grpc.ServiceRegistrar, srv WebsocketHandlerServer)
func RegisterWebsocketServer ¶
func RegisterWebsocketServer(s grpc.ServiceRegistrar, srv WebsocketServer)
Types ¶
type ClientMessage ¶
type ClientMessage struct { // Globally unique id to pair requests/responses Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Types that are assignable to Content: // // *ClientMessage_RegistrationRequest // *ClientMessage_WebsocketEventResponse Content isClientMessage_Content `protobuf_oneof:"content"` // contains filtered or unexported fields }
ClientMessages are sent from the service to the nitric server
func (*ClientMessage) Descriptor
deprecated
func (*ClientMessage) Descriptor() ([]byte, []int)
Deprecated: Use ClientMessage.ProtoReflect.Descriptor instead.
func (*ClientMessage) GetContent ¶
func (m *ClientMessage) GetContent() isClientMessage_Content
func (*ClientMessage) GetId ¶
func (x *ClientMessage) GetId() string
func (*ClientMessage) GetRegistrationRequest ¶
func (x *ClientMessage) GetRegistrationRequest() *RegistrationRequest
func (*ClientMessage) GetWebsocketEventResponse ¶
func (x *ClientMessage) GetWebsocketEventResponse() *WebsocketEventResponse
func (*ClientMessage) ProtoMessage ¶
func (*ClientMessage) ProtoMessage()
func (*ClientMessage) ProtoReflect ¶
func (x *ClientMessage) ProtoReflect() protoreflect.Message
func (*ClientMessage) Reset ¶
func (x *ClientMessage) Reset()
func (*ClientMessage) String ¶
func (x *ClientMessage) String() string
type ClientMessage_RegistrationRequest ¶
type ClientMessage_RegistrationRequest struct { // Client initialisation request // A worker will not be eligible for triggers // until it has identified itself RegistrationRequest *RegistrationRequest `protobuf:"bytes,2,opt,name=registration_request,json=registrationRequest,proto3,oneof"` }
type ClientMessage_WebsocketEventResponse ¶
type ClientMessage_WebsocketEventResponse struct { // Client responding with result of a trigger WebsocketEventResponse *WebsocketEventResponse `protobuf:"bytes,3,opt,name=websocket_event_response,json=websocketEventResponse,proto3,oneof"` }
type QueryValue ¶
type QueryValue struct { Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*QueryValue) Descriptor
deprecated
func (*QueryValue) Descriptor() ([]byte, []int)
Deprecated: Use QueryValue.ProtoReflect.Descriptor instead.
func (*QueryValue) GetValue ¶
func (x *QueryValue) GetValue() []string
func (*QueryValue) ProtoMessage ¶
func (*QueryValue) ProtoMessage()
func (*QueryValue) ProtoReflect ¶
func (x *QueryValue) ProtoReflect() protoreflect.Message
func (*QueryValue) Reset ¶
func (x *QueryValue) Reset()
func (*QueryValue) String ¶
func (x *QueryValue) String() string
type RegistrationRequest ¶
type RegistrationRequest struct { // The nitric name of the socket that this worker listens on SocketName string `protobuf:"bytes,1,opt,name=socket_name,json=socketName,proto3" json:"socket_name,omitempty"` // The type of event that this worker handles EventType WebsocketEventType `` /* 140-byte string literal not displayed */ // contains filtered or unexported fields }
func (*RegistrationRequest) Descriptor
deprecated
func (*RegistrationRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegistrationRequest.ProtoReflect.Descriptor instead.
func (*RegistrationRequest) GetEventType ¶
func (x *RegistrationRequest) GetEventType() WebsocketEventType
func (*RegistrationRequest) GetSocketName ¶
func (x *RegistrationRequest) GetSocketName() string
func (*RegistrationRequest) ProtoMessage ¶
func (*RegistrationRequest) ProtoMessage()
func (*RegistrationRequest) ProtoReflect ¶
func (x *RegistrationRequest) ProtoReflect() protoreflect.Message
func (*RegistrationRequest) Reset ¶
func (x *RegistrationRequest) Reset()
func (*RegistrationRequest) String ¶
func (x *RegistrationRequest) String() string
type RegistrationResponse ¶
type RegistrationResponse struct {
// contains filtered or unexported fields
}
Placeholder message
func (*RegistrationResponse) Descriptor
deprecated
func (*RegistrationResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegistrationResponse.ProtoReflect.Descriptor instead.
func (*RegistrationResponse) ProtoMessage ¶
func (*RegistrationResponse) ProtoMessage()
func (*RegistrationResponse) ProtoReflect ¶
func (x *RegistrationResponse) ProtoReflect() protoreflect.Message
func (*RegistrationResponse) Reset ¶
func (x *RegistrationResponse) Reset()
func (*RegistrationResponse) String ¶
func (x *RegistrationResponse) String() string
type ServerMessage ¶
type ServerMessage struct { // Server message ID, used to pair requests/responses Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Types that are assignable to Content: // // *ServerMessage_RegistrationResponse // *ServerMessage_WebsocketEventRequest Content isServerMessage_Content `protobuf_oneof:"content"` // contains filtered or unexported fields }
ServerMessages are sent from the nitric server to the service
func (*ServerMessage) Descriptor
deprecated
func (*ServerMessage) Descriptor() ([]byte, []int)
Deprecated: Use ServerMessage.ProtoReflect.Descriptor instead.
func (*ServerMessage) GetContent ¶
func (m *ServerMessage) GetContent() isServerMessage_Content
func (*ServerMessage) GetId ¶
func (x *ServerMessage) GetId() string
func (*ServerMessage) GetRegistrationResponse ¶
func (x *ServerMessage) GetRegistrationResponse() *RegistrationResponse
func (*ServerMessage) GetWebsocketEventRequest ¶
func (x *ServerMessage) GetWebsocketEventRequest() *WebsocketEventRequest
func (*ServerMessage) ProtoMessage ¶
func (*ServerMessage) ProtoMessage()
func (*ServerMessage) ProtoReflect ¶
func (x *ServerMessage) ProtoReflect() protoreflect.Message
func (*ServerMessage) Reset ¶
func (x *ServerMessage) Reset()
func (*ServerMessage) String ¶
func (x *ServerMessage) String() string
type ServerMessage_RegistrationResponse ¶
type ServerMessage_RegistrationResponse struct { // Server responding // with client configuration details to an // InitRequest RegistrationResponse *RegistrationResponse `protobuf:"bytes,2,opt,name=registration_response,json=registrationResponse,proto3,oneof"` }
type ServerMessage_WebsocketEventRequest ¶
type ServerMessage_WebsocketEventRequest struct { // Server requesting client to process an event WebsocketEventRequest *WebsocketEventRequest `protobuf:"bytes,3,opt,name=websocket_event_request,json=websocketEventRequest,proto3,oneof"` }
type UnimplementedWebsocketHandlerServer ¶
type UnimplementedWebsocketHandlerServer struct { }
UnimplementedWebsocketHandlerServer should be embedded to have forward compatible implementations.
func (UnimplementedWebsocketHandlerServer) HandleEvents ¶
func (UnimplementedWebsocketHandlerServer) HandleEvents(WebsocketHandler_HandleEventsServer) error
type UnimplementedWebsocketServer ¶
type UnimplementedWebsocketServer struct { }
UnimplementedWebsocketServer should be embedded to have forward compatible implementations.
func (UnimplementedWebsocketServer) CloseConnection ¶
func (UnimplementedWebsocketServer) CloseConnection(context.Context, *WebsocketCloseConnectionRequest) (*WebsocketCloseConnectionResponse, error)
func (UnimplementedWebsocketServer) SendMessage ¶
func (UnimplementedWebsocketServer) SendMessage(context.Context, *WebsocketSendRequest) (*WebsocketSendResponse, error)
func (UnimplementedWebsocketServer) SocketDetails ¶
func (UnimplementedWebsocketServer) SocketDetails(context.Context, *WebsocketDetailsRequest) (*WebsocketDetailsResponse, error)
type UnsafeWebsocketHandlerServer ¶
type UnsafeWebsocketHandlerServer interface {
// contains filtered or unexported methods
}
UnsafeWebsocketHandlerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WebsocketHandlerServer will result in compilation errors.
type UnsafeWebsocketServer ¶
type UnsafeWebsocketServer interface {
// contains filtered or unexported methods
}
UnsafeWebsocketServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WebsocketServer will result in compilation errors.
type WebsocketClient ¶
type WebsocketClient interface { // Send a messages to a websocket SendMessage(ctx context.Context, in *WebsocketSendRequest, opts ...grpc.CallOption) (*WebsocketSendResponse, error) // Close a websocket connection // This can be used to force a client to disconnect CloseConnection(ctx context.Context, in *WebsocketCloseConnectionRequest, opts ...grpc.CallOption) (*WebsocketCloseConnectionResponse, error) // Retrieve details about an API SocketDetails(ctx context.Context, in *WebsocketDetailsRequest, opts ...grpc.CallOption) (*WebsocketDetailsResponse, error) }
WebsocketClient is the client API for Websocket service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewWebsocketClient ¶
func NewWebsocketClient(cc grpc.ClientConnInterface) WebsocketClient
type WebsocketCloseConnectionRequest ¶
type WebsocketCloseConnectionRequest struct { // The nitric name of the socket to send on SocketName string `protobuf:"bytes,1,opt,name=socket_name,json=socketName,proto3" json:"socket_name,omitempty"` // The connection ID of the client to send to ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` // contains filtered or unexported fields }
func (*WebsocketCloseConnectionRequest) Descriptor
deprecated
func (*WebsocketCloseConnectionRequest) Descriptor() ([]byte, []int)
Deprecated: Use WebsocketCloseConnectionRequest.ProtoReflect.Descriptor instead.
func (*WebsocketCloseConnectionRequest) GetConnectionId ¶
func (x *WebsocketCloseConnectionRequest) GetConnectionId() string
func (*WebsocketCloseConnectionRequest) GetSocketName ¶
func (x *WebsocketCloseConnectionRequest) GetSocketName() string
func (*WebsocketCloseConnectionRequest) ProtoMessage ¶
func (*WebsocketCloseConnectionRequest) ProtoMessage()
func (*WebsocketCloseConnectionRequest) ProtoReflect ¶
func (x *WebsocketCloseConnectionRequest) ProtoReflect() protoreflect.Message
func (*WebsocketCloseConnectionRequest) Reset ¶
func (x *WebsocketCloseConnectionRequest) Reset()
func (*WebsocketCloseConnectionRequest) String ¶
func (x *WebsocketCloseConnectionRequest) String() string
type WebsocketCloseConnectionResponse ¶
type WebsocketCloseConnectionResponse struct {
// contains filtered or unexported fields
}
func (*WebsocketCloseConnectionResponse) Descriptor
deprecated
func (*WebsocketCloseConnectionResponse) Descriptor() ([]byte, []int)
Deprecated: Use WebsocketCloseConnectionResponse.ProtoReflect.Descriptor instead.
func (*WebsocketCloseConnectionResponse) ProtoMessage ¶
func (*WebsocketCloseConnectionResponse) ProtoMessage()
func (*WebsocketCloseConnectionResponse) ProtoReflect ¶
func (x *WebsocketCloseConnectionResponse) ProtoReflect() protoreflect.Message
func (*WebsocketCloseConnectionResponse) Reset ¶
func (x *WebsocketCloseConnectionResponse) Reset()
func (*WebsocketCloseConnectionResponse) String ¶
func (x *WebsocketCloseConnectionResponse) String() string
type WebsocketConnectionEvent ¶
type WebsocketConnectionEvent struct { // The query params available in the connection request QueryParams map[string]*QueryValue `` /* 182-byte string literal not displayed */ // contains filtered or unexported fields }
func (*WebsocketConnectionEvent) Descriptor
deprecated
func (*WebsocketConnectionEvent) Descriptor() ([]byte, []int)
Deprecated: Use WebsocketConnectionEvent.ProtoReflect.Descriptor instead.
func (*WebsocketConnectionEvent) GetQueryParams ¶
func (x *WebsocketConnectionEvent) GetQueryParams() map[string]*QueryValue
func (*WebsocketConnectionEvent) ProtoMessage ¶
func (*WebsocketConnectionEvent) ProtoMessage()
func (*WebsocketConnectionEvent) ProtoReflect ¶
func (x *WebsocketConnectionEvent) ProtoReflect() protoreflect.Message
func (*WebsocketConnectionEvent) Reset ¶
func (x *WebsocketConnectionEvent) Reset()
func (*WebsocketConnectionEvent) String ¶
func (x *WebsocketConnectionEvent) String() string
type WebsocketConnectionResponse ¶
type WebsocketConnectionResponse struct { Reject bool `protobuf:"varint,1,opt,name=reject,proto3" json:"reject,omitempty"` // contains filtered or unexported fields }
func (*WebsocketConnectionResponse) Descriptor
deprecated
func (*WebsocketConnectionResponse) Descriptor() ([]byte, []int)
Deprecated: Use WebsocketConnectionResponse.ProtoReflect.Descriptor instead.
func (*WebsocketConnectionResponse) GetReject ¶
func (x *WebsocketConnectionResponse) GetReject() bool
func (*WebsocketConnectionResponse) ProtoMessage ¶
func (*WebsocketConnectionResponse) ProtoMessage()
func (*WebsocketConnectionResponse) ProtoReflect ¶
func (x *WebsocketConnectionResponse) ProtoReflect() protoreflect.Message
func (*WebsocketConnectionResponse) Reset ¶
func (x *WebsocketConnectionResponse) Reset()
func (*WebsocketConnectionResponse) String ¶
func (x *WebsocketConnectionResponse) String() string
type WebsocketDetailsRequest ¶
type WebsocketDetailsRequest struct { SocketName string `protobuf:"bytes,1,opt,name=socket_name,json=socketName,proto3" json:"socket_name,omitempty"` // contains filtered or unexported fields }
func (*WebsocketDetailsRequest) Descriptor
deprecated
func (*WebsocketDetailsRequest) Descriptor() ([]byte, []int)
Deprecated: Use WebsocketDetailsRequest.ProtoReflect.Descriptor instead.
func (*WebsocketDetailsRequest) GetSocketName ¶
func (x *WebsocketDetailsRequest) GetSocketName() string
func (*WebsocketDetailsRequest) ProtoMessage ¶
func (*WebsocketDetailsRequest) ProtoMessage()
func (*WebsocketDetailsRequest) ProtoReflect ¶
func (x *WebsocketDetailsRequest) ProtoReflect() protoreflect.Message
func (*WebsocketDetailsRequest) Reset ¶
func (x *WebsocketDetailsRequest) Reset()
func (*WebsocketDetailsRequest) String ¶
func (x *WebsocketDetailsRequest) String() string
type WebsocketDetailsResponse ¶
type WebsocketDetailsResponse struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` // contains filtered or unexported fields }
func (*WebsocketDetailsResponse) Descriptor
deprecated
func (*WebsocketDetailsResponse) Descriptor() ([]byte, []int)
Deprecated: Use WebsocketDetailsResponse.ProtoReflect.Descriptor instead.
func (*WebsocketDetailsResponse) GetUrl ¶
func (x *WebsocketDetailsResponse) GetUrl() string
func (*WebsocketDetailsResponse) ProtoMessage ¶
func (*WebsocketDetailsResponse) ProtoMessage()
func (*WebsocketDetailsResponse) ProtoReflect ¶
func (x *WebsocketDetailsResponse) ProtoReflect() protoreflect.Message
func (*WebsocketDetailsResponse) Reset ¶
func (x *WebsocketDetailsResponse) Reset()
func (*WebsocketDetailsResponse) String ¶
func (x *WebsocketDetailsResponse) String() string
type WebsocketDisconnectionEvent ¶
type WebsocketDisconnectionEvent struct {
// contains filtered or unexported fields
}
func (*WebsocketDisconnectionEvent) Descriptor
deprecated
func (*WebsocketDisconnectionEvent) Descriptor() ([]byte, []int)
Deprecated: Use WebsocketDisconnectionEvent.ProtoReflect.Descriptor instead.
func (*WebsocketDisconnectionEvent) ProtoMessage ¶
func (*WebsocketDisconnectionEvent) ProtoMessage()
func (*WebsocketDisconnectionEvent) ProtoReflect ¶
func (x *WebsocketDisconnectionEvent) ProtoReflect() protoreflect.Message
func (*WebsocketDisconnectionEvent) Reset ¶
func (x *WebsocketDisconnectionEvent) Reset()
func (*WebsocketDisconnectionEvent) String ¶
func (x *WebsocketDisconnectionEvent) String() string
type WebsocketEventRequest ¶
type WebsocketEventRequest struct { // The nitric name of the socket that this worker listens on SocketName string `protobuf:"bytes,1,opt,name=socket_name,json=socketName,proto3" json:"socket_name,omitempty"` // The connection this trigger came from ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` // Types that are assignable to WebsocketEvent: // // *WebsocketEventRequest_Connection // *WebsocketEventRequest_Disconnection // *WebsocketEventRequest_Message WebsocketEvent isWebsocketEventRequest_WebsocketEvent `protobuf_oneof:"websocket_event"` // contains filtered or unexported fields }
func (*WebsocketEventRequest) Descriptor
deprecated
func (*WebsocketEventRequest) Descriptor() ([]byte, []int)
Deprecated: Use WebsocketEventRequest.ProtoReflect.Descriptor instead.
func (*WebsocketEventRequest) GetConnection ¶
func (x *WebsocketEventRequest) GetConnection() *WebsocketConnectionEvent
func (*WebsocketEventRequest) GetConnectionId ¶
func (x *WebsocketEventRequest) GetConnectionId() string
func (*WebsocketEventRequest) GetDisconnection ¶
func (x *WebsocketEventRequest) GetDisconnection() *WebsocketDisconnectionEvent
func (*WebsocketEventRequest) GetMessage ¶
func (x *WebsocketEventRequest) GetMessage() *WebsocketMessageEvent
func (*WebsocketEventRequest) GetSocketName ¶
func (x *WebsocketEventRequest) GetSocketName() string
func (*WebsocketEventRequest) GetWebsocketEvent ¶
func (m *WebsocketEventRequest) GetWebsocketEvent() isWebsocketEventRequest_WebsocketEvent
func (*WebsocketEventRequest) ProtoMessage ¶
func (*WebsocketEventRequest) ProtoMessage()
func (*WebsocketEventRequest) ProtoReflect ¶
func (x *WebsocketEventRequest) ProtoReflect() protoreflect.Message
func (*WebsocketEventRequest) Reset ¶
func (x *WebsocketEventRequest) Reset()
func (*WebsocketEventRequest) String ¶
func (x *WebsocketEventRequest) String() string
type WebsocketEventRequest_Connection ¶
type WebsocketEventRequest_Connection struct {
Connection *WebsocketConnectionEvent `protobuf:"bytes,10,opt,name=connection,proto3,oneof"`
}
type WebsocketEventRequest_Disconnection ¶
type WebsocketEventRequest_Disconnection struct {
Disconnection *WebsocketDisconnectionEvent `protobuf:"bytes,11,opt,name=disconnection,proto3,oneof"`
}
type WebsocketEventRequest_Message ¶
type WebsocketEventRequest_Message struct {
Message *WebsocketMessageEvent `protobuf:"bytes,12,opt,name=message,proto3,oneof"`
}
type WebsocketEventResponse ¶
type WebsocketEventResponse struct { // Types that are assignable to WebsocketResponse: // // *WebsocketEventResponse_ConnectionResponse WebsocketResponse isWebsocketEventResponse_WebsocketResponse `protobuf_oneof:"websocket_response"` // contains filtered or unexported fields }
func (*WebsocketEventResponse) Descriptor
deprecated
func (*WebsocketEventResponse) Descriptor() ([]byte, []int)
Deprecated: Use WebsocketEventResponse.ProtoReflect.Descriptor instead.
func (*WebsocketEventResponse) GetConnectionResponse ¶
func (x *WebsocketEventResponse) GetConnectionResponse() *WebsocketConnectionResponse
func (*WebsocketEventResponse) GetWebsocketResponse ¶
func (m *WebsocketEventResponse) GetWebsocketResponse() isWebsocketEventResponse_WebsocketResponse
func (*WebsocketEventResponse) ProtoMessage ¶
func (*WebsocketEventResponse) ProtoMessage()
func (*WebsocketEventResponse) ProtoReflect ¶
func (x *WebsocketEventResponse) ProtoReflect() protoreflect.Message
func (*WebsocketEventResponse) Reset ¶
func (x *WebsocketEventResponse) Reset()
func (*WebsocketEventResponse) String ¶
func (x *WebsocketEventResponse) String() string
type WebsocketEventResponse_ConnectionResponse ¶
type WebsocketEventResponse_ConnectionResponse struct {
ConnectionResponse *WebsocketConnectionResponse `protobuf:"bytes,10,opt,name=connection_response,json=connectionResponse,proto3,oneof"`
}
type WebsocketEventType ¶
type WebsocketEventType int32
const ( // Specialised Event for handling new client connections WebsocketEventType_Connect WebsocketEventType = 0 // Specialised Event for handling existing client connections WebsocketEventType_Disconnect WebsocketEventType = 1 // All other types of events are messages WebsocketEventType_Message WebsocketEventType = 2 )
func (WebsocketEventType) Descriptor ¶
func (WebsocketEventType) Descriptor() protoreflect.EnumDescriptor
func (WebsocketEventType) Enum ¶
func (x WebsocketEventType) Enum() *WebsocketEventType
func (WebsocketEventType) EnumDescriptor
deprecated
func (WebsocketEventType) EnumDescriptor() ([]byte, []int)
Deprecated: Use WebsocketEventType.Descriptor instead.
func (WebsocketEventType) Number ¶
func (x WebsocketEventType) Number() protoreflect.EnumNumber
func (WebsocketEventType) String ¶
func (x WebsocketEventType) String() string
func (WebsocketEventType) Type ¶
func (WebsocketEventType) Type() protoreflect.EnumType
type WebsocketHandlerClient ¶
type WebsocketHandlerClient interface { // Handle incoming websocket events HandleEvents(ctx context.Context, opts ...grpc.CallOption) (WebsocketHandler_HandleEventsClient, error) }
WebsocketHandlerClient is the client API for WebsocketHandler service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewWebsocketHandlerClient ¶
func NewWebsocketHandlerClient(cc grpc.ClientConnInterface) WebsocketHandlerClient
type WebsocketHandlerServer ¶
type WebsocketHandlerServer interface { // Handle incoming websocket events HandleEvents(WebsocketHandler_HandleEventsServer) error }
WebsocketHandlerServer is the server API for WebsocketHandler service. All implementations should embed UnimplementedWebsocketHandlerServer for forward compatibility
type WebsocketHandler_HandleEventsClient ¶
type WebsocketHandler_HandleEventsClient interface { Send(*ClientMessage) error Recv() (*ServerMessage, error) grpc.ClientStream }
type WebsocketHandler_HandleEventsServer ¶
type WebsocketHandler_HandleEventsServer interface { Send(*ServerMessage) error Recv() (*ClientMessage, error) grpc.ServerStream }
type WebsocketMessageEvent ¶
type WebsocketMessageEvent struct { // Data available on Body []byte `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*WebsocketMessageEvent) Descriptor
deprecated
func (*WebsocketMessageEvent) Descriptor() ([]byte, []int)
Deprecated: Use WebsocketMessageEvent.ProtoReflect.Descriptor instead.
func (*WebsocketMessageEvent) GetBody ¶
func (x *WebsocketMessageEvent) GetBody() []byte
func (*WebsocketMessageEvent) ProtoMessage ¶
func (*WebsocketMessageEvent) ProtoMessage()
func (*WebsocketMessageEvent) ProtoReflect ¶
func (x *WebsocketMessageEvent) ProtoReflect() protoreflect.Message
func (*WebsocketMessageEvent) Reset ¶
func (x *WebsocketMessageEvent) Reset()
func (*WebsocketMessageEvent) String ¶
func (x *WebsocketMessageEvent) String() string
type WebsocketSendRequest ¶
type WebsocketSendRequest struct { // The nitric name of the socket to send on SocketName string `protobuf:"bytes,1,opt,name=socket_name,json=socketName,proto3" json:"socket_name,omitempty"` // The connection ID of the client to send to ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` // The data to send to the socket Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*WebsocketSendRequest) Descriptor
deprecated
func (*WebsocketSendRequest) Descriptor() ([]byte, []int)
Deprecated: Use WebsocketSendRequest.ProtoReflect.Descriptor instead.
func (*WebsocketSendRequest) GetConnectionId ¶
func (x *WebsocketSendRequest) GetConnectionId() string
func (*WebsocketSendRequest) GetData ¶
func (x *WebsocketSendRequest) GetData() []byte
func (*WebsocketSendRequest) GetSocketName ¶
func (x *WebsocketSendRequest) GetSocketName() string
func (*WebsocketSendRequest) ProtoMessage ¶
func (*WebsocketSendRequest) ProtoMessage()
func (*WebsocketSendRequest) ProtoReflect ¶
func (x *WebsocketSendRequest) ProtoReflect() protoreflect.Message
func (*WebsocketSendRequest) Reset ¶
func (x *WebsocketSendRequest) Reset()
func (*WebsocketSendRequest) String ¶
func (x *WebsocketSendRequest) String() string
type WebsocketSendResponse ¶
type WebsocketSendResponse struct {
// contains filtered or unexported fields
}
func (*WebsocketSendResponse) Descriptor
deprecated
func (*WebsocketSendResponse) Descriptor() ([]byte, []int)
Deprecated: Use WebsocketSendResponse.ProtoReflect.Descriptor instead.
func (*WebsocketSendResponse) ProtoMessage ¶
func (*WebsocketSendResponse) ProtoMessage()
func (*WebsocketSendResponse) ProtoReflect ¶
func (x *WebsocketSendResponse) ProtoReflect() protoreflect.Message
func (*WebsocketSendResponse) Reset ¶
func (x *WebsocketSendResponse) Reset()
func (*WebsocketSendResponse) String ¶
func (x *WebsocketSendResponse) String() string
type WebsocketServer ¶
type WebsocketServer interface { // Send a messages to a websocket SendMessage(context.Context, *WebsocketSendRequest) (*WebsocketSendResponse, error) // Close a websocket connection // This can be used to force a client to disconnect CloseConnection(context.Context, *WebsocketCloseConnectionRequest) (*WebsocketCloseConnectionResponse, error) // Retrieve details about an API SocketDetails(context.Context, *WebsocketDetailsRequest) (*WebsocketDetailsResponse, error) }
WebsocketServer is the server API for Websocket service. All implementations should embed UnimplementedWebsocketServer for forward compatibility