Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterConnectionServiceServer(s grpc.ServiceRegistrar, srv ConnectionServiceServer)
- type Connection
- func (*Connection) Descriptor() ([]byte, []int)deprecated
- func (x *Connection) GetConnectedAt() *timestamppb.Timestamp
- func (x *Connection) GetGatewayId() string
- func (x *Connection) GetId() string
- func (x *Connection) GetIdentity() *Identity
- func (x *Connection) GetLastActiveAt() *timestamppb.Timestamp
- func (*Connection) ProtoMessage()
- func (x *Connection) ProtoReflect() protoreflect.Message
- func (x *Connection) Reset()
- func (m *Connection) SetConnectedAt(v *timestamppb.Timestamp)
- func (m *Connection) SetGatewayId(v string)
- func (m *Connection) SetId(v string)
- func (m *Connection) SetIdentity(v *Identity)
- func (m *Connection) SetLastActiveAt(v *timestamppb.Timestamp)
- func (x *Connection) String() string
- type ConnectionServiceClient
- type ConnectionServiceServer
- type DisconnectRequest
- func (*DisconnectRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DisconnectRequest) GetConnectionId() string
- func (*DisconnectRequest) ProtoMessage()
- func (x *DisconnectRequest) ProtoReflect() protoreflect.Message
- func (x *DisconnectRequest) Reset()
- func (m *DisconnectRequest) SetConnectionId(v string)
- func (x *DisconnectRequest) String() string
- type DisconnectResponse
- type GetConnectionRequest
- func (*GetConnectionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetConnectionRequest) GetConnectionId() string
- func (*GetConnectionRequest) ProtoMessage()
- func (x *GetConnectionRequest) ProtoReflect() protoreflect.Message
- func (x *GetConnectionRequest) Reset()
- func (m *GetConnectionRequest) SetConnectionId(v string)
- func (x *GetConnectionRequest) String() string
- type Identity
- func (*Identity) Descriptor() ([]byte, []int)deprecated
- func (x *Identity) GetSourceIp() string
- func (x *Identity) GetUserAgent() string
- func (*Identity) ProtoMessage()
- func (x *Identity) ProtoReflect() protoreflect.Message
- func (x *Identity) Reset()
- func (m *Identity) SetSourceIp(v string)
- func (m *Identity) SetUserAgent(v string)
- func (x *Identity) String() string
- type SendToConnectionRequest
- func (*SendToConnectionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendToConnectionRequest) GetConnectionId() string
- func (x *SendToConnectionRequest) GetData() []byte
- func (x *SendToConnectionRequest) GetType() SendToConnectionRequest_DataType
- func (*SendToConnectionRequest) ProtoMessage()
- func (x *SendToConnectionRequest) ProtoReflect() protoreflect.Message
- func (x *SendToConnectionRequest) Reset()
- func (m *SendToConnectionRequest) SetConnectionId(v string)
- func (m *SendToConnectionRequest) SetData(v []byte)
- func (m *SendToConnectionRequest) SetType(v SendToConnectionRequest_DataType)
- func (x *SendToConnectionRequest) String() string
- type SendToConnectionRequest_DataType
- func (SendToConnectionRequest_DataType) Descriptor() protoreflect.EnumDescriptor
- func (x SendToConnectionRequest_DataType) Enum() *SendToConnectionRequest_DataType
- func (SendToConnectionRequest_DataType) EnumDescriptor() ([]byte, []int)deprecated
- func (x SendToConnectionRequest_DataType) Number() protoreflect.EnumNumber
- func (x SendToConnectionRequest_DataType) String() string
- func (SendToConnectionRequest_DataType) Type() protoreflect.EnumType
- type SendToConnectionResponse
- type UnimplementedConnectionServiceServer
- func (UnimplementedConnectionServiceServer) Disconnect(context.Context, *DisconnectRequest) (*DisconnectResponse, error)
- func (UnimplementedConnectionServiceServer) Get(context.Context, *GetConnectionRequest) (*Connection, error)
- func (UnimplementedConnectionServiceServer) Send(context.Context, *SendToConnectionRequest) (*SendToConnectionResponse, error)
- type UnsafeConnectionServiceServer
Constants ¶
const ( ConnectionService_Get_FullMethodName = "/yandex.cloud.serverless.apigateway.websocket.v1.ConnectionService/Get" ConnectionService_Send_FullMethodName = "/yandex.cloud.serverless.apigateway.websocket.v1.ConnectionService/Send" ConnectionService_Disconnect_FullMethodName = "/yandex.cloud.serverless.apigateway.websocket.v1.ConnectionService/Disconnect" )
Variables ¶
var ( SendToConnectionRequest_DataType_name = map[int32]string{ 0: "DATA_TYPE_UNSPECIFIED", 1: "BINARY", 2: "TEXT", } SendToConnectionRequest_DataType_value = map[string]int32{ "DATA_TYPE_UNSPECIFIED": 0, "BINARY": 1, "TEXT": 2, } )
Enum value maps for SendToConnectionRequest_DataType.
var ConnectionService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "yandex.cloud.serverless.apigateway.websocket.v1.ConnectionService", HandlerType: (*ConnectionServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _ConnectionService_Get_Handler, }, { MethodName: "Send", Handler: _ConnectionService_Send_Handler, }, { MethodName: "Disconnect", Handler: _ConnectionService_Disconnect_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "yandex/cloud/serverless/apigateway/websocket/v1/connection_service.proto", }
ConnectionService_ServiceDesc is the grpc.ServiceDesc for ConnectionService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_yandex_cloud_serverless_apigateway_websocket_v1_connection_proto protoreflect.FileDescriptor
var File_yandex_cloud_serverless_apigateway_websocket_v1_connection_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterConnectionServiceServer ¶
func RegisterConnectionServiceServer(s grpc.ServiceRegistrar, srv ConnectionServiceServer)
Types ¶
type Connection ¶
type Connection struct { // ID of the connection. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // ID of the API Gateway. GatewayId string `protobuf:"bytes,2,opt,name=gateway_id,json=gatewayId,proto3" json:"gateway_id,omitempty"` // The information about the caller making the request to API Gateway. Identity *Identity `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` // The timestamp at which connection was established. ConnectedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=connected_at,json=connectedAt,proto3" json:"connected_at,omitempty"` // The timestamp at which connection was last accessed. LastActiveAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_active_at,json=lastActiveAt,proto3" json:"last_active_at,omitempty"` // contains filtered or unexported fields }
func (*Connection) Descriptor
deprecated
func (*Connection) Descriptor() ([]byte, []int)
Deprecated: Use Connection.ProtoReflect.Descriptor instead.
func (*Connection) GetConnectedAt ¶
func (x *Connection) GetConnectedAt() *timestamppb.Timestamp
func (*Connection) GetGatewayId ¶
func (x *Connection) GetGatewayId() string
func (*Connection) GetId ¶
func (x *Connection) GetId() string
func (*Connection) GetIdentity ¶
func (x *Connection) GetIdentity() *Identity
func (*Connection) GetLastActiveAt ¶
func (x *Connection) GetLastActiveAt() *timestamppb.Timestamp
func (*Connection) ProtoMessage ¶
func (*Connection) ProtoMessage()
func (*Connection) ProtoReflect ¶
func (x *Connection) ProtoReflect() protoreflect.Message
func (*Connection) Reset ¶
func (x *Connection) Reset()
func (*Connection) SetConnectedAt ¶
func (m *Connection) SetConnectedAt(v *timestamppb.Timestamp)
func (*Connection) SetGatewayId ¶
func (m *Connection) SetGatewayId(v string)
func (*Connection) SetId ¶
func (m *Connection) SetId(v string)
func (*Connection) SetIdentity ¶
func (m *Connection) SetIdentity(v *Identity)
func (*Connection) SetLastActiveAt ¶
func (m *Connection) SetLastActiveAt(v *timestamppb.Timestamp)
func (*Connection) String ¶
func (x *Connection) String() string
type ConnectionServiceClient ¶
type ConnectionServiceClient interface { // Returns the specified connection info. Get(ctx context.Context, in *GetConnectionRequest, opts ...grpc.CallOption) (*Connection, error) // Sends data to the specified connection. Send(ctx context.Context, in *SendToConnectionRequest, opts ...grpc.CallOption) (*SendToConnectionResponse, error) // Disconnects the specified connection. Disconnect(ctx context.Context, in *DisconnectRequest, opts ...grpc.CallOption) (*DisconnectResponse, error) }
ConnectionServiceClient is the client API for ConnectionService 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 NewConnectionServiceClient ¶
func NewConnectionServiceClient(cc grpc.ClientConnInterface) ConnectionServiceClient
type ConnectionServiceServer ¶
type ConnectionServiceServer interface { // Returns the specified connection info. Get(context.Context, *GetConnectionRequest) (*Connection, error) // Sends data to the specified connection. Send(context.Context, *SendToConnectionRequest) (*SendToConnectionResponse, error) // Disconnects the specified connection. Disconnect(context.Context, *DisconnectRequest) (*DisconnectResponse, error) }
ConnectionServiceServer is the server API for ConnectionService service. All implementations should embed UnimplementedConnectionServiceServer for forward compatibility
type DisconnectRequest ¶
type DisconnectRequest struct { // ID of the connection to disconnect. ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` // contains filtered or unexported fields }
func (*DisconnectRequest) Descriptor
deprecated
func (*DisconnectRequest) Descriptor() ([]byte, []int)
Deprecated: Use DisconnectRequest.ProtoReflect.Descriptor instead.
func (*DisconnectRequest) GetConnectionId ¶
func (x *DisconnectRequest) GetConnectionId() string
func (*DisconnectRequest) ProtoMessage ¶
func (*DisconnectRequest) ProtoMessage()
func (*DisconnectRequest) ProtoReflect ¶
func (x *DisconnectRequest) ProtoReflect() protoreflect.Message
func (*DisconnectRequest) Reset ¶
func (x *DisconnectRequest) Reset()
func (*DisconnectRequest) SetConnectionId ¶
func (m *DisconnectRequest) SetConnectionId(v string)
func (*DisconnectRequest) String ¶
func (x *DisconnectRequest) String() string
type DisconnectResponse ¶
type DisconnectResponse struct {
// contains filtered or unexported fields
}
func (*DisconnectResponse) Descriptor
deprecated
func (*DisconnectResponse) Descriptor() ([]byte, []int)
Deprecated: Use DisconnectResponse.ProtoReflect.Descriptor instead.
func (*DisconnectResponse) ProtoMessage ¶
func (*DisconnectResponse) ProtoMessage()
func (*DisconnectResponse) ProtoReflect ¶
func (x *DisconnectResponse) ProtoReflect() protoreflect.Message
func (*DisconnectResponse) Reset ¶
func (x *DisconnectResponse) Reset()
func (*DisconnectResponse) String ¶
func (x *DisconnectResponse) String() string
type GetConnectionRequest ¶
type GetConnectionRequest struct { // ID of the connection to get. ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` // contains filtered or unexported fields }
func (*GetConnectionRequest) Descriptor
deprecated
func (*GetConnectionRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetConnectionRequest.ProtoReflect.Descriptor instead.
func (*GetConnectionRequest) GetConnectionId ¶
func (x *GetConnectionRequest) GetConnectionId() string
func (*GetConnectionRequest) ProtoMessage ¶
func (*GetConnectionRequest) ProtoMessage()
func (*GetConnectionRequest) ProtoReflect ¶
func (x *GetConnectionRequest) ProtoReflect() protoreflect.Message
func (*GetConnectionRequest) Reset ¶
func (x *GetConnectionRequest) Reset()
func (*GetConnectionRequest) SetConnectionId ¶
func (m *GetConnectionRequest) SetConnectionId(v string)
func (*GetConnectionRequest) String ¶
func (x *GetConnectionRequest) String() string
type Identity ¶
type Identity struct { // The source IP address of the caller making the request to API Gateway. SourceIp string `protobuf:"bytes,1,opt,name=source_ip,json=sourceIp,proto3" json:"source_ip,omitempty"` // The User Agent of the caller making the request to API Gateway. UserAgent string `protobuf:"bytes,2,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"` // contains filtered or unexported fields }
func (*Identity) Descriptor
deprecated
func (*Identity) GetSourceIp ¶
func (*Identity) GetUserAgent ¶
func (*Identity) ProtoMessage ¶
func (*Identity) ProtoMessage()
func (*Identity) ProtoReflect ¶
func (x *Identity) ProtoReflect() protoreflect.Message
func (*Identity) SetSourceIp ¶
func (*Identity) SetUserAgent ¶
type SendToConnectionRequest ¶
type SendToConnectionRequest struct { // ID of the connection to which send. ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` // Data to send. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // Type of the sending data. Type SendToConnectionRequest_DataType `` /* 148-byte string literal not displayed */ // contains filtered or unexported fields }
func (*SendToConnectionRequest) Descriptor
deprecated
func (*SendToConnectionRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendToConnectionRequest.ProtoReflect.Descriptor instead.
func (*SendToConnectionRequest) GetConnectionId ¶
func (x *SendToConnectionRequest) GetConnectionId() string
func (*SendToConnectionRequest) GetData ¶
func (x *SendToConnectionRequest) GetData() []byte
func (*SendToConnectionRequest) GetType ¶
func (x *SendToConnectionRequest) GetType() SendToConnectionRequest_DataType
func (*SendToConnectionRequest) ProtoMessage ¶
func (*SendToConnectionRequest) ProtoMessage()
func (*SendToConnectionRequest) ProtoReflect ¶
func (x *SendToConnectionRequest) ProtoReflect() protoreflect.Message
func (*SendToConnectionRequest) Reset ¶
func (x *SendToConnectionRequest) Reset()
func (*SendToConnectionRequest) SetConnectionId ¶
func (m *SendToConnectionRequest) SetConnectionId(v string)
func (*SendToConnectionRequest) SetData ¶
func (m *SendToConnectionRequest) SetData(v []byte)
func (*SendToConnectionRequest) SetType ¶
func (m *SendToConnectionRequest) SetType(v SendToConnectionRequest_DataType)
func (*SendToConnectionRequest) String ¶
func (x *SendToConnectionRequest) String() string
type SendToConnectionRequest_DataType ¶
type SendToConnectionRequest_DataType int32
const ( SendToConnectionRequest_DATA_TYPE_UNSPECIFIED SendToConnectionRequest_DataType = 0 // Binary data. SendToConnectionRequest_BINARY SendToConnectionRequest_DataType = 1 // Text data. SendToConnectionRequest_TEXT SendToConnectionRequest_DataType = 2 )
func (SendToConnectionRequest_DataType) Descriptor ¶
func (SendToConnectionRequest_DataType) Descriptor() protoreflect.EnumDescriptor
func (SendToConnectionRequest_DataType) Enum ¶
func (x SendToConnectionRequest_DataType) Enum() *SendToConnectionRequest_DataType
func (SendToConnectionRequest_DataType) EnumDescriptor
deprecated
func (SendToConnectionRequest_DataType) EnumDescriptor() ([]byte, []int)
Deprecated: Use SendToConnectionRequest_DataType.Descriptor instead.
func (SendToConnectionRequest_DataType) Number ¶
func (x SendToConnectionRequest_DataType) Number() protoreflect.EnumNumber
func (SendToConnectionRequest_DataType) String ¶
func (x SendToConnectionRequest_DataType) String() string
func (SendToConnectionRequest_DataType) Type ¶
func (SendToConnectionRequest_DataType) Type() protoreflect.EnumType
type SendToConnectionResponse ¶
type SendToConnectionResponse struct {
// contains filtered or unexported fields
}
func (*SendToConnectionResponse) Descriptor
deprecated
func (*SendToConnectionResponse) Descriptor() ([]byte, []int)
Deprecated: Use SendToConnectionResponse.ProtoReflect.Descriptor instead.
func (*SendToConnectionResponse) ProtoMessage ¶
func (*SendToConnectionResponse) ProtoMessage()
func (*SendToConnectionResponse) ProtoReflect ¶
func (x *SendToConnectionResponse) ProtoReflect() protoreflect.Message
func (*SendToConnectionResponse) Reset ¶
func (x *SendToConnectionResponse) Reset()
func (*SendToConnectionResponse) String ¶
func (x *SendToConnectionResponse) String() string
type UnimplementedConnectionServiceServer ¶
type UnimplementedConnectionServiceServer struct { }
UnimplementedConnectionServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedConnectionServiceServer) Disconnect ¶
func (UnimplementedConnectionServiceServer) Disconnect(context.Context, *DisconnectRequest) (*DisconnectResponse, error)
func (UnimplementedConnectionServiceServer) Get ¶
func (UnimplementedConnectionServiceServer) Get(context.Context, *GetConnectionRequest) (*Connection, error)
type UnsafeConnectionServiceServer ¶
type UnsafeConnectionServiceServer interface {
// contains filtered or unexported methods
}
UnsafeConnectionServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ConnectionServiceServer will result in compilation errors.