-
Notifications
You must be signed in to change notification settings - Fork 559
Closed
Labels
lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Description
I have a problem with the usage of readNamespacedPodLog with the follow parameter set to true.
This function returns a Promise (BlueBird). I'd like to display the logs in real time of a pod in my Angular app but I have no idea of how to use the promise of a streamed response ...
I tried this :
import * as rxnode from 'rx-node'
...
let logs = await this.k8sApi.readNamespacedPodLog(podName,this.ns,containerName,true)
rxnode.fromReadableStream(logs.response).subscribe((i)={
...
})
I saw in the source code that the Promise returns a http.ClientResponse which extends an IncomingMessage which extends a stream.Readable which implements NodeJS.ReadableStream. So thats why I though using .fromReadableStream with the rx-node librarie ... But it does'nt work.
Do you have any advice of how I can use this method (in streaming way) with Javascript?
Thank you
juliahw, itai-codefresh, borremosch, pito-svk, popcornylu and 6 more
Metadata
Metadata
Assignees
Labels
lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.Denotes an issue or PR that has aged beyond stale and will be auto-closed.