본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Interface: ExecStreamOptions

원문 보기 위키 갱신

Docker Desktop 확장 SDK의 ExecStreamOptions 인터페이스예요. 명령 출력을 스트림으로 받을 때 쓰는 옵션을 정의해요.

출처: 문서

본문

Interface: ExecStreamOptions

Since

0.2.2

속성

onOutput

• Optional onOutput: (data: { stdout: string ; stderr?: undefined } | { stdout?: undefined ; stderr: string }) => void

Type declaration

▸ (data): void

Invoked when receiving output from command execution. By default, the output is split into chunks at arbitrary boundaries. If you prefer the output to be split into complete lines, set splitOutputLines to true. The callback is then invoked once for each line.

Since

0.2.0

파라미터

Name | Type | Description data | { stdout: string; stderr?: undefined } | { stdout?: undefined; stderr: string } | Output content. Can include either stdout string, or stderr string, one at a time.

반환값

void

onError

• Optional onError: (error: any) => void

Type declaration

▸ (error): void

Invoked to report error if the executed command errors.

파라미터

Name | Type | Description error | any | The error happening in the executed command

반환값

void

onClose

• Optional onClose: (exitCode: number) => void

Type declaration

▸ (exitCode): void

Invoked when process exits.

파라미터

Name | Type | Description exitCode | number | The process exit code

반환값

void

splitOutputLines

• Optional Readonly splitOutputLines: boolean

Specifies the behaviour invoking onOutput(data). Raw output by default, splitting output at any position. If set to true, onOutput will be invoked once for each line.

더 알아보기