서명:
export declare class FunctionBuilder
생성자
건설자 | 수정자 | 설명 |
---|---|---|
(생성자)(옵션) | FunctionBuilder 클래스의 새 인스턴스를 생성합니다. |
속성
재산 | 수정자 | 유형 | 설명 |
---|---|---|---|
해석학 | { 이벤트: (analyticsEventType: 문자열) => Analytics.AnalyticsEventBuilder ; } | ||
인증 | { 사용자: (userOptions?: auth.UserOptions ) => 인증.UserBuilder ; } | ||
데이터 베이스 | { 인스턴스: (인스턴스: 문자열) => 데이터베이스.InstanceBuilder ; ref: <Ref 확장 문자열>(경로: Ref) => 데이터베이스.RefBuilder <참조>; } | ||
소방서 | { 문서: <Path 확장 문자열>(path: Path) => firestore.DocumentBuilder <경로>; 네임스페이스: (네임스페이스: 문자열) => firestore.NamespaceBuilder ; 데이터베이스: (데이터베이스: 문자열) => firestore.DatabaseBuilder ; } | ||
https | { onRequest: (핸들러: (req: https.Request, resp: express.Response) => void | Promise<void>) => import("./cloud-functions"). Https함수 ; onCall: (핸들러: (데이터: 임의, 컨텍스트: https.CallableContext ) => 모두 | 약속<모든>) => import("./cloud-functions"). HttpsFunction & import("./cloud-functions"). 실행 가능 <아무거나>; } | ||
게시자 | { 주제: (주제: 문자열) => pubsub.TopicBuilder ; 일정: (일정: 문자열) => pubsub.ScheduleBuilder ; } | ||
원격 구성 | { onUpdate: (처리기: (버전: remoteConfig.TemplateVersion , 컨텍스트: EventContext ) => PromiseLike<모든> | 모두) => import("./cloud-functions"). CloudFunction < 원격구성.템플릿버전 >; } | ||
저장 | { 버킷: (버킷?: 문자열) => Storage.BucketBuilder ; 객체: () => Storage.ObjectBuilder ; } | ||
작업 | { taskQueue: (옵션?: task.TaskQueueOptions ) => 작업.TaskQueueBuilder ; } | ||
테스트랩 | { testMatrix: () => testLab.TestMatrixBuilder ; } |
행동 양식
방법 | 수정자 | 설명 |
---|---|---|
지역(지역) | 함수가 배포되는 지역을 구성합니다. | |
runWith(런타임옵션) | 함수에 대한 런타임 옵션을 구성합니다. |
FunctionBuilder.(생성자)
FunctionBuilder
클래스의 새 인스턴스를 생성합니다.
서명:
constructor(options: DeploymentOptions);
매개변수
매개변수 | 유형 | 설명 |
---|---|---|
옵션 | 배포 옵션 |
FunctionBuilder.analytics
서명:
get analytics(): {
event: (analyticsEventType: string) => analytics.AnalyticsEventBuilder;
};
FunctionBuilder.auth
서명:
get auth(): {
user: (userOptions?: auth.UserOptions) => auth.UserBuilder;
};
FunctionBuilder.database
서명:
get database(): {
instance: (instance: string) => database.InstanceBuilder;
ref: <Ref extends string>(path: Ref) => database.RefBuilder<Ref>;
};
FunctionBuilder.firestore
서명:
get firestore(): {
document: <Path extends string>(path: Path) => firestore.DocumentBuilder<Path>;
namespace: (namespace: string) => firestore.NamespaceBuilder;
database: (database: string) => firestore.DatabaseBuilder;
};
FunctionBuilder.https
서명:
get https(): {
onRequest: (handler: (req: https.Request, resp: express.Response) => void | Promise<void>) => import("./cloud-functions").HttpsFunction;
onCall: (handler: (data: any, context: https.CallableContext) => any | Promise<any>) => import("./cloud-functions").HttpsFunction & import("./cloud-functions").Runnable<any>;
};
FunctionBuilder.pubsub
서명:
get pubsub(): {
topic: (topic: string) => pubsub.TopicBuilder;
schedule: (schedule: string) => pubsub.ScheduleBuilder;
};
FunctionBuilder.remoteConfig
서명:
get remoteConfig(): {
onUpdate: (handler: (version: remoteConfig.TemplateVersion, context: EventContext) => PromiseLike<any> | any) => import("./cloud-functions").CloudFunction<remoteConfig.TemplateVersion>;
};
FunctionBuilder.storage
서명:
get storage(): {
bucket: (bucket?: string) => storage.BucketBuilder;
object: () => storage.ObjectBuilder;
};
FunctionBuilder.tasks
서명:
get tasks(): {
taskQueue: (options?: tasks.TaskQueueOptions) => tasks.TaskQueueBuilder;
};
FunctionBuilder.testLab
서명:
get testLab(): {
testMatrix: () => testLab.TestMatrixBuilder;
};
FunctionBuilder.region()
함수가 배포되는 지역을 구성합니다.
서명:
region(...regions: Array<(typeof SUPPORTED_REGIONS)[number] | string | Expression<string> | ResetValue>): FunctionBuilder;
매개변수
매개변수 | 유형 | 설명 |
---|---|---|
지역 | 배열<( SUPPORTED_REGIONS 유형 )[번호] | 문자열 | 표현 <문자열> | 재설정값> | 하나 이상의 지역 문자열. |
보고:
실시예 1
function.region('us-east1')
실시예 2
function.region('us-east1', 'us-central1')
FunctionBuilder.runWith()
함수에 대한 런타임 옵션을 구성합니다.
서명:
runWith(runtimeOptions: RuntimeOptions): FunctionBuilder;
매개변수
매개변수 | 유형 | 설명 |
---|---|---|
런타임옵션 | 런타임옵션 | 선택적 필드가 있는 개체: 1. memory : 함수에 할당할 메모리 양, 가능한 값은 '128MB', '256MB', '512MB', '1GB', '2GB', '4GB' 및 '8GB'입니다. . 2. timeoutSeconds : 함수에 대한 시간 제한(초), 가능한 값은 0~540입니다. 3. failurePolicy : 함수의 실패 정책으로, 부울 true 빈 재시도 개체를 제공하는 것과 동일합니다. 4. vpcConnector : 동일한 프로젝트 및 지역에 있는 VPC 커넥터의 ID 5. vpcConnectorEgressSettings : vpcConnector 설정되면 vpcConnector 통해 전송되는 송신 트래픽을 제어합니다. 값은 null일 수 없습니다. |
보고: