@cubejs-client/ws-transport
WebSocket transport for Cube client
WebSocketTransport
constructor
new WebSocketTransport(__namedParameters: object): WebSocketTransport
apiUrl
apiUrl: string
hearBeatInterval
hearBeatInterval: number
messageCounter
messageCounter: number
messageIdToSubscription
messageIdToSubscription: Record‹number, Subscription›
messageQueue
messageQueue: Message[]
token
token: string
ws
ws: any
authorization
initSocket
initSocket(): any
request
request(method: string, __namedParameters: object): object
sendMessage
protected
sendMessage(message: any): void
WebSocketTransportResult
constructor
new WebSocketTransportResult(__namedParameters: object): WebSocketTransportResult
result
result: unknown
status
status: unknown
json
json(): Promise‹unknown›
Types
Message
Name | Type |
---|---|
messageId | number |
method | string |
params | string |
requestId | any |
Subscription
Name | Type |
---|---|
callback | (result: WebSocketTransportResult) => void |
message | Message |
WebSocketTransportOptions
Name | Type |
---|---|
apiUrl | string |
authorization | string |
hearBeatInterval? | number |
heartBeatInterval? | number |