클라이언트 옵션
lib/shoal.ts
createClient({
key: process.env.SHOAL_KEY!, // required
baseUrl: "https://edge.shoal.dev",
streaming: true,
pollInterval: 30_000,
timeout: 3_000,
bootstrap: undefined,
logger: console,
onError: (err) => report(err),
});| 옵션 | 타입 | 기본값 | 설명 |
|---|---|---|---|
key | string | — | 한 환경의 서버 키 또는 클라이언트 키 |
baseUrl | string | https://edge.shoal.dev | 자체 호스팅 릴레이나 리전 엔드포인트 |
streaming | boolean | true | SSE로 업데이트 수신, 안 되면 폴링 |
pollInterval | number | 30000 | 스트리밍을 끈 경우 폴링 주기(ms) |
timeout | number | 3000 | 첫 룰셋을 기다리는 최대 시간, 넘으면 대체값 사용 |
bootstrap | object | — | 네트워크 왕복을 피하기 위한 초깃값(SSR) |
logger | Logger | console | null이면 로그 끔 |
onError | function | — | 네트워크·파싱 오류 시 호출 |
shoal.yaml
저장소 루트에 두는 프로젝트 파일로, CLI가 읽습니다.
shoal.yaml
project: prj_8d2kq
types:
out: src/shoal.d.ts
environments:
default: development
flags:
new-checkout:
owner: "@payments"
permanent: false