@restatedev/restate-sdk 0.7.3-worker → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +29 -51
- package/dist/clients/workflow_client.d.ts +77 -0
- package/dist/clients/workflow_client.d.ts.map +1 -0
- package/dist/clients/workflow_client.js +172 -0
- package/dist/clients/workflow_client.js.map +1 -0
- package/dist/connection/buffered_connection.js +44 -0
- package/dist/connection/buffered_connection.js.map +1 -0
- package/dist/connection/connection.js +13 -0
- package/dist/connection/connection.js.map +1 -0
- package/dist/connection/embedded_connection.js +59 -0
- package/dist/connection/embedded_connection.js.map +1 -0
- package/dist/connection/http_connection.js +203 -0
- package/dist/connection/http_connection.js.map +1 -0
- package/dist/connection/lambda_connection.js +58 -0
- package/dist/connection/lambda_connection.js.map +1 -0
- package/dist/{restate_context.d.ts → context.d.ts} +239 -170
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +113 -0
- package/dist/context.js.map +1 -0
- package/dist/{restate_context_impl.d.ts → context_impl.d.ts} +26 -30
- package/dist/context_impl.d.ts.map +1 -0
- package/dist/context_impl.js +439 -0
- package/dist/context_impl.js.map +1 -0
- package/dist/embedded/api.d.ts +2 -2
- package/dist/embedded/api.d.ts.map +1 -1
- package/dist/embedded/api.js +35 -0
- package/dist/embedded/api.js.map +1 -0
- package/dist/embedded/handler.d.ts +2 -2
- package/dist/embedded/handler.d.ts.map +1 -1
- package/dist/embedded/handler.js +26 -0
- package/dist/embedded/handler.js.map +1 -0
- package/dist/embedded/http2_remote.js +91 -0
- package/dist/embedded/http2_remote.js.map +1 -0
- package/dist/embedded/invocation.d.ts.map +1 -1
- package/dist/embedded/invocation.js +94 -0
- package/dist/embedded/invocation.js.map +1 -0
- package/dist/endpoint/endpoint_impl.d.ts +35 -0
- package/dist/endpoint/endpoint_impl.d.ts.map +1 -0
- package/dist/endpoint/endpoint_impl.js +405 -0
- package/dist/endpoint/endpoint_impl.js.map +1 -0
- package/dist/endpoint/http2_handler.d.ts +11 -0
- package/dist/endpoint/http2_handler.d.ts.map +1 -0
- package/dist/endpoint/http2_handler.js +119 -0
- package/dist/endpoint/http2_handler.js.map +1 -0
- package/dist/endpoint/lambda_handler.d.ts +15 -0
- package/dist/endpoint/lambda_handler.d.ts.map +1 -0
- package/dist/endpoint/lambda_handler.js +144 -0
- package/dist/endpoint/lambda_handler.js.map +1 -0
- package/dist/endpoint.d.ts +161 -0
- package/dist/endpoint.d.ts.map +1 -0
- package/dist/endpoint.js +22 -0
- package/dist/endpoint.js.map +1 -0
- package/dist/generated/dev/restate/events.js +371 -0
- package/dist/generated/dev/restate/events.js.map +1 -0
- package/dist/generated/dev/restate/ext.js +215 -0
- package/dist/generated/dev/restate/ext.js.map +1 -0
- package/dist/generated/google/protobuf/descriptor.js +6676 -0
- package/dist/generated/google/protobuf/descriptor.js.map +1 -0
- package/dist/generated/google/protobuf/empty.js +107 -0
- package/dist/generated/google/protobuf/empty.js.map +1 -0
- package/dist/generated/google/protobuf/struct.js +754 -0
- package/dist/generated/google/protobuf/struct.js.map +1 -0
- package/dist/generated/proto/discovery.js +364 -0
- package/dist/generated/proto/discovery.js.map +1 -0
- package/dist/generated/proto/dynrpc.js +668 -0
- package/dist/generated/proto/dynrpc.js.map +1 -0
- package/dist/generated/proto/javascript.d.ts +13 -0
- package/dist/generated/proto/javascript.d.ts.map +1 -1
- package/dist/generated/proto/javascript.js +416 -0
- package/dist/generated/proto/javascript.js.map +1 -0
- package/dist/generated/proto/protocol.d.ts +43 -0
- package/dist/generated/proto/protocol.d.ts.map +1 -1
- package/dist/generated/proto/protocol.js +2641 -0
- package/dist/generated/proto/protocol.js.map +1 -0
- package/dist/generated/proto/services.js +1535 -0
- package/dist/generated/proto/services.js.map +1 -0
- package/dist/generated/proto/test.js +321 -0
- package/dist/generated/proto/test.js.map +1 -0
- package/dist/invocation.d.ts +4 -1
- package/dist/invocation.d.ts.map +1 -1
- package/dist/invocation.js +157 -0
- package/dist/invocation.js.map +1 -0
- package/dist/io/decoder.d.ts +1 -0
- package/dist/io/decoder.d.ts.map +1 -1
- package/dist/io/decoder.js +140 -0
- package/dist/io/decoder.js.map +1 -0
- package/dist/io/encoder.d.ts +1 -2
- package/dist/io/encoder.d.ts.map +1 -1
- package/dist/io/encoder.js +68 -0
- package/dist/io/encoder.js.map +1 -0
- package/dist/journal.d.ts +13 -4
- package/dist/journal.d.ts.map +1 -1
- package/dist/journal.js +405 -0
- package/dist/journal.js.map +1 -0
- package/dist/local_state_store.d.ts +5 -3
- package/dist/local_state_store.d.ts.map +1 -1
- package/dist/local_state_store.js +82 -0
- package/dist/local_state_store.js.map +1 -0
- package/dist/logger.d.ts +19 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +90 -0
- package/dist/logger.js.map +1 -0
- package/dist/promise_combinator_tracker.d.ts +29 -0
- package/dist/promise_combinator_tracker.d.ts.map +1 -0
- package/dist/promise_combinator_tracker.js +128 -0
- package/dist/promise_combinator_tracker.js.map +1 -0
- package/dist/public_api.d.ts +5 -5
- package/dist/public_api.d.ts.map +1 -1
- package/dist/public_api.js +60 -0
- package/dist/public_api.js.map +1 -0
- package/dist/state_machine.d.ts +19 -12
- package/dist/state_machine.d.ts.map +1 -1
- package/dist/state_machine.js +437 -0
- package/dist/state_machine.js.map +1 -0
- package/dist/types/errors.d.ts +12 -3
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +273 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/grpc.d.ts +6 -4
- package/dist/types/grpc.d.ts.map +1 -1
- package/dist/types/grpc.js +81 -0
- package/dist/types/grpc.js.map +1 -0
- package/dist/types/protocol.d.ts +9 -5
- package/dist/types/protocol.d.ts.map +1 -1
- package/dist/types/protocol.js +147 -0
- package/dist/types/protocol.js.map +1 -0
- package/dist/types/router.d.ts +8 -8
- package/dist/types/router.d.ts.map +1 -1
- package/dist/types/router.js +36 -0
- package/dist/types/router.js.map +1 -0
- package/dist/types/types.d.ts +1 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/types.js +138 -0
- package/dist/types/types.js.map +1 -0
- package/dist/utils/{assumpsions.d.ts → assumptions.d.ts} +1 -1
- package/dist/utils/{assumpsions.d.ts.map → assumptions.d.ts.map} +1 -1
- package/dist/utils/assumptions.js +101 -0
- package/dist/utils/assumptions.js.map +1 -0
- package/dist/utils/message_logger.d.ts +28 -0
- package/dist/utils/message_logger.d.ts.map +1 -0
- package/dist/utils/message_logger.js +88 -0
- package/dist/utils/message_logger.js.map +1 -0
- package/dist/utils/promises.d.ts +15 -0
- package/dist/utils/promises.d.ts.map +1 -0
- package/dist/utils/promises.js +67 -0
- package/dist/utils/promises.js.map +1 -0
- package/dist/utils/public_utils.js +49 -0
- package/dist/utils/public_utils.js.map +1 -0
- package/dist/utils/rand.d.ts +1 -1
- package/dist/utils/rand.d.ts.map +1 -1
- package/dist/utils/rand.js +114 -0
- package/dist/utils/rand.js.map +1 -0
- package/dist/utils/utils.d.ts +1 -10
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +122 -0
- package/dist/utils/utils.js.map +1 -0
- package/dist/workflows/workflow.d.ts +101 -0
- package/dist/workflows/workflow.d.ts.map +1 -0
- package/dist/workflows/workflow.js +80 -0
- package/dist/workflows/workflow.js.map +1 -0
- package/dist/workflows/workflow_state_service.d.ts +35 -0
- package/dist/workflows/workflow_state_service.d.ts.map +1 -0
- package/dist/workflows/workflow_state_service.js +201 -0
- package/dist/workflows/workflow_state_service.js.map +1 -0
- package/dist/workflows/workflow_wrapper_service.d.ts +10 -0
- package/dist/workflows/workflow_wrapper_service.d.ts.map +1 -0
- package/dist/workflows/workflow_wrapper_service.js +264 -0
- package/dist/workflows/workflow_wrapper_service.js.map +1 -0
- package/package.json +38 -39
- package/src/clients/workflow_client.ts +290 -0
- package/src/connection/buffered_connection.ts +47 -0
- package/src/connection/connection.ts +34 -0
- package/src/connection/embedded_connection.ts +62 -0
- package/src/connection/http_connection.ts +228 -0
- package/src/connection/lambda_connection.ts +69 -0
- package/src/context.ts +633 -0
- package/src/context_impl.ts +721 -0
- package/src/embedded/api.ts +57 -0
- package/src/embedded/handler.ts +36 -0
- package/src/embedded/http2_remote.ts +103 -0
- package/src/embedded/invocation.ts +126 -0
- package/src/endpoint/endpoint_impl.ts +623 -0
- package/src/endpoint/http2_handler.ts +151 -0
- package/src/endpoint/lambda_handler.ts +181 -0
- package/src/endpoint.ts +187 -0
- package/src/generated/dev/restate/events.ts +430 -0
- package/src/generated/dev/restate/ext.ts +238 -0
- package/src/generated/google/protobuf/descriptor.ts +7889 -0
- package/src/generated/google/protobuf/empty.ts +150 -0
- package/src/generated/google/protobuf/struct.ts +878 -0
- package/src/generated/proto/discovery.ts +423 -0
- package/src/generated/proto/dynrpc.ts +768 -0
- package/src/generated/proto/javascript.ts +488 -0
- package/src/generated/proto/protocol.ts +3091 -0
- package/src/generated/proto/services.ts +1834 -0
- package/src/generated/proto/test.ts +387 -0
- package/src/invocation.ts +212 -0
- package/src/io/decoder.ts +171 -0
- package/src/io/encoder.ts +72 -0
- package/src/journal.ts +537 -0
- package/src/local_state_store.ts +94 -0
- package/src/logger.ts +121 -0
- package/src/promise_combinator_tracker.ts +191 -0
- package/src/public_api.ts +53 -0
- package/src/state_machine.ts +635 -0
- package/src/types/errors.ts +297 -0
- package/src/types/grpc.ts +97 -0
- package/src/types/protocol.ts +201 -0
- package/src/types/router.ts +118 -0
- package/src/types/types.ts +160 -0
- package/src/utils/assumptions.ts +131 -0
- package/src/utils/message_logger.ts +112 -0
- package/src/utils/promises.ts +118 -0
- package/src/utils/public_utils.ts +91 -0
- package/src/utils/rand.ts +142 -0
- package/src/utils/utils.ts +178 -0
- package/src/workflows/workflow.ts +178 -0
- package/src/workflows/workflow_state_service.ts +299 -0
- package/src/workflows/workflow_wrapper_service.ts +314 -0
- package/dist/cloudflare_bundle.js +0 -27387
- package/dist/restate_context.d.ts.map +0 -1
- package/dist/restate_context_impl.d.ts.map +0 -1
- package/dist/server/base_restate_server.d.ts +0 -32
- package/dist/server/base_restate_server.d.ts.map +0 -1
- package/dist/server/restate_lambda_handler.d.ts +0 -104
- package/dist/server/restate_lambda_handler.d.ts.map +0 -1
- package/dist/server/restate_server.d.ts +0 -97
- package/dist/server/restate_server.d.ts.map +0 -1
- package/dist/utils/logger.d.ts +0 -60
- package/dist/utils/logger.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"restate_context.d.ts","sourceRoot":"","sources":["../src/restate_context.ts"],"names":[],"mappings":";AAYA,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;;;OAQG;IACH,IAAI,EAAE,IAAI,CAAC;IAEX;;;;;;;;;;;OAWG;IACH,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAExC;;;;;;;;;;;OAWG;IACH,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;IAErC;;;;;;;OAOG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwCG;IACH,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAE7E;;;;;;;;;;;;;;;;;;;OAmBG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,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAGvC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI;IAGpC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAGzB,UAAU,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAG/C,SAAS,CAAC,CAAC,KAAK;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAA;KAAE;IAGnD,gBAAgB,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI;IAGjD,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAGjD,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3C,WAAW,IAAI,kBAAkB;CAGlC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { GrpcService, GrpcServiceMethod, HostedGrpcServiceMethod, ProtoMetadata } from "../types/grpc";
|
|
2
|
-
import { ProtocolMode, ServiceDiscoveryResponse } from "../generated/proto/discovery";
|
|
3
|
-
import { MethodDescriptorProto as MethodDescriptorProto1 } from "ts-proto-descriptors";
|
|
4
|
-
import { ProtoMetadata as RpcServiceProtoMetadata } from "../generated/proto/dynrpc";
|
|
5
|
-
export interface ServiceOpts {
|
|
6
|
-
descriptor: ProtoMetadata;
|
|
7
|
-
service: string;
|
|
8
|
-
instance: unknown;
|
|
9
|
-
}
|
|
10
|
-
export declare abstract class BaseRestateServer {
|
|
11
|
-
protected readonly methods: Record<string, HostedGrpcServiceMethod<unknown, unknown>>;
|
|
12
|
-
protected readonly discovery: ServiceDiscoveryResponse;
|
|
13
|
-
protected readonly dynrpcDescriptor: RpcServiceProtoMetadata;
|
|
14
|
-
protected constructor(protocolMode: ProtocolMode);
|
|
15
|
-
protected addDescriptor(descriptor: ProtoMetadata): void;
|
|
16
|
-
bindService({ descriptor, service, instance }: ServiceOpts): void;
|
|
17
|
-
rpcHandler(keyed: boolean, route: string, handler: Function): {
|
|
18
|
-
descriptor: MethodDescriptorProto1;
|
|
19
|
-
method: GrpcServiceMethod<unknown, unknown>;
|
|
20
|
-
};
|
|
21
|
-
stringKeyedEventHandler(keyed: boolean, route: string, handler: Function): {
|
|
22
|
-
descriptor: MethodDescriptorProto1;
|
|
23
|
-
method: GrpcServiceMethod<unknown, unknown>;
|
|
24
|
-
};
|
|
25
|
-
protected bindRpcService(name: string, router: RpcRouter, keyed: boolean): void;
|
|
26
|
-
protected methodByUrl<I, O>(url: string | undefined | null): HostedGrpcServiceMethod<I, O> | undefined;
|
|
27
|
-
}
|
|
28
|
-
export declare function parseService(meta: ProtoMetadata, serviceName: string, instance: any): GrpcService;
|
|
29
|
-
export type RpcRouter = {
|
|
30
|
-
[key: string]: Function;
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=base_restate_server.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base_restate_server.d.ts","sourceRoot":"","sources":["../../src/server/base_restate_server.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,uBAAuB,EACvB,aAAa,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EACZ,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AAOtC,OAAO,EAGL,qBAAqB,IAAI,sBAAsB,EAChD,MAAM,sBAAsB,CAAC;AAK9B,OAAO,EAGL,aAAa,IAAI,uBAAuB,EAGzC,MAAM,2BAA2B,CAAC;AAQnC,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,aAAa,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,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Q,CAAC;CACzB,CAAC"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { BaseRestateServer, ServiceOpts } from "./base_restate_server";
|
|
2
|
-
import { KeyedRouter, UnKeyedRouter } from "../public_api";
|
|
3
|
-
/**
|
|
4
|
-
* Creates an Restate entrypoint for services deployed on AWS Lambda and invoked
|
|
5
|
-
* through API Gateway.
|
|
6
|
-
*
|
|
7
|
-
* Register services on this entrypoint via {@link LambdaRestateServer.bindService } and
|
|
8
|
-
* then create the Lambda invocation handler via {@link LambdaRestateServer.handle }.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* A typical AWS Lambda entry point would look like this
|
|
12
|
-
* ```
|
|
13
|
-
* import * as restate from "@restatedev/restate-sdk";
|
|
14
|
-
*
|
|
15
|
-
* export const handler = restate
|
|
16
|
-
* .createLambdaApiGatewayHandler()
|
|
17
|
-
* .bindService({
|
|
18
|
-
* service: "MyService",
|
|
19
|
-
* instance: new myService.MyServiceImpl(),
|
|
20
|
-
* descriptor: myService.protoMetadata,
|
|
21
|
-
* })
|
|
22
|
-
* .handle();
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export declare function createLambdaApiGatewayHandler(): LambdaRestateServer;
|
|
26
|
-
/**
|
|
27
|
-
* Restate entrypoint implementation for services deployed on AWS Lambda.
|
|
28
|
-
* This one decodes the requests, create the log event sequence that
|
|
29
|
-
* drives the durable execution of the service invocations.
|
|
30
|
-
*/
|
|
31
|
-
export declare class LambdaRestateServer extends BaseRestateServer {
|
|
32
|
-
constructor();
|
|
33
|
-
/**
|
|
34
|
-
* Adds a gRPC service to be served from this endpoint.
|
|
35
|
-
*
|
|
36
|
-
* The {@link ServiceOpts} passed here need to describe the following properties:
|
|
37
|
-
*
|
|
38
|
-
* - The 'service' name: the name of the gRPC service (as in the service definition proto file).
|
|
39
|
-
* - The service 'instance': the implementation of the service logic (must implement the generated
|
|
40
|
-
* gRPC service interface).
|
|
41
|
-
* - The gRPC/protobuf 'descriptor': The protoMetadata descriptor that describes the service, methods,
|
|
42
|
-
* and parameter types. It is usually found as the value 'protoMetadata' in the generated
|
|
43
|
-
* file '(service-name).ts'
|
|
44
|
-
*
|
|
45
|
-
* The descriptor is generated by the protobuf compiler and needed by Restate to reflectively discover
|
|
46
|
-
* the service details, understand payload serialization, perform HTTP/JSON-to-gRPC transcoding, or
|
|
47
|
-
* to proxy the service.
|
|
48
|
-
*
|
|
49
|
-
* If you define multiple services in the same '.proto' file, you may have only one descriptor that
|
|
50
|
-
* describes all services together. You can pass the same descriptor to multiple calls of '.bindService()'.
|
|
51
|
-
*
|
|
52
|
-
* If you don't find the gRPC/protobuf descriptor, make your you generated the gRPC/ProtoBuf code with
|
|
53
|
-
* the option to generate the descriptor. For example, using the 'ts-proto' plugin, make sure you pass
|
|
54
|
-
* the 'outputSchema=true' option. If you are using Restate's project templates, this should all be
|
|
55
|
-
* pre-configured for you.
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* ```
|
|
59
|
-
* endpoint.bindService({
|
|
60
|
-
* service: "MyService",
|
|
61
|
-
* instance: new myService.MyServiceImpl(),
|
|
62
|
-
* descriptor: myService.protoMetadata
|
|
63
|
-
* })
|
|
64
|
-
* ```
|
|
65
|
-
*
|
|
66
|
-
* @param serviceOpts The options describing the service to be bound. See above for a detailed description.
|
|
67
|
-
* @returns An instance of this LambdaRestateServer
|
|
68
|
-
*/
|
|
69
|
-
bindService(serviceOpts: ServiceOpts): LambdaRestateServer;
|
|
70
|
-
bindRouter<M>(path: string, router: UnKeyedRouter<M>): LambdaRestateServer;
|
|
71
|
-
bindKeyedRouter<M>(path: string, router: KeyedRouter<M>): LambdaRestateServer;
|
|
72
|
-
/**
|
|
73
|
-
* Creates the invocation handler function to be called by AWS Lambda.
|
|
74
|
-
*
|
|
75
|
-
* The returned type of this function is `(event: APIGatewayProxyEvent | APIGatewayProxyEventV2) => Promise<APIGatewayProxyResult | APIGatewayProxyResultV2>`.
|
|
76
|
-
* We use `any` types here to avoid a dependency on the `@types/aws-lambda` dependency for consumers of this API.
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* A typical AWS Lambda entry point would use this method the follwing way:
|
|
80
|
-
* ```
|
|
81
|
-
* import * as restate from "@restatedev/restate-sdk";
|
|
82
|
-
*
|
|
83
|
-
* export const handler = restate
|
|
84
|
-
* .createLambdaApiGatewayHandler()
|
|
85
|
-
* .bindService({
|
|
86
|
-
* service: "MyService",
|
|
87
|
-
* instance: new myService.MyServiceImpl(),
|
|
88
|
-
* descriptor: myService.protoMetadata,
|
|
89
|
-
* })
|
|
90
|
-
* .handle();
|
|
91
|
-
* ```
|
|
92
|
-
*
|
|
93
|
-
* @returns The invocation handler function for to be called by AWS Lambda.
|
|
94
|
-
*/
|
|
95
|
-
handle(): (event: any) => Promise<any>;
|
|
96
|
-
/**
|
|
97
|
-
* This is the main request handling method, effectively a typed variant of `create()`.
|
|
98
|
-
*/
|
|
99
|
-
private handleRequest;
|
|
100
|
-
private handleInvoke;
|
|
101
|
-
private handleDiscovery;
|
|
102
|
-
private toErrorResponse;
|
|
103
|
-
}
|
|
104
|
-
//# sourceMappingURL=restate_lambda_handler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"restate_lambda_handler.d.ts","sourceRoot":"","sources":["../../src/server/restate_lambda_handler.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOvE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG3D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,6BAA6B,IAAI,mBAAmB,CAEnE;AAED;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,iBAAiB;;IAKxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACI,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,mBAAmB;IAO1D,UAAU,CAAC,CAAC,EACjB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GACvB,mBAAmB;IAKf,eAAe,CAAC,CAAC,EACtB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,GACrB,mBAAmB;IAKtB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IAEI,MAAM,IAAI,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC;IAO7C;;OAEG;YACW,aAAa;YAuCb,YAAY;IA0D1B,OAAO,CAAC,eAAe;IAkBvB,OAAO,CAAC,eAAe;CAUxB"}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { Http2ServerRequest, Http2ServerResponse } from "http2";
|
|
3
|
-
import { ServiceOpts } from "./base_restate_server";
|
|
4
|
-
import { KeyedRouter, UnKeyedRouter } from "../types/router";
|
|
5
|
-
export interface RestateServer {
|
|
6
|
-
(request: Http2ServerRequest, response: Http2ServerResponse): void;
|
|
7
|
-
/**
|
|
8
|
-
* Adds a gRPC service to be served from this endpoint.
|
|
9
|
-
*
|
|
10
|
-
* The {@link ServiceOpts} passed here need to describe the following properties:
|
|
11
|
-
*
|
|
12
|
-
* - The 'service' name: the name of the gRPC service (as in the service definition proto file).
|
|
13
|
-
* - The service 'instance': the implementation of the service logic (must implement the generated
|
|
14
|
-
* gRPC service interface).
|
|
15
|
-
* - The gRPC/protobuf 'descriptor': The protoMetadata descriptor that describes the service, methods,
|
|
16
|
-
* and parameter types. It is usually found as the value 'protoMetadata' in the generated
|
|
17
|
-
* file '(service-name).ts'
|
|
18
|
-
*
|
|
19
|
-
* The descriptor is generated by the protobuf compiler and needed by Restate to reflectively discover
|
|
20
|
-
* the service details, understand payload serialization, perform HTTP/JSON-to-gRPC transcoding, or
|
|
21
|
-
* to proxy the service.
|
|
22
|
-
*
|
|
23
|
-
* If you define multiple services in the same '.proto' file, you may have only one descriptor that
|
|
24
|
-
* describes all services together. You can pass the same descriptor to multiple calls of '.bindService()'.
|
|
25
|
-
*
|
|
26
|
-
* If you don't find the gRPC/protobuf descriptor, make your you generated the gRPC/ProtoBuf code with
|
|
27
|
-
* the option to generate the descriptor. For example, using the 'ts-proto' plugin, make sure you pass
|
|
28
|
-
* the 'outputSchema=true' option. If you are using Restate's project templates, this should all be
|
|
29
|
-
* pre-configured for you.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```
|
|
33
|
-
* endpoint.bindService({
|
|
34
|
-
* service: "MyService",
|
|
35
|
-
* instance: new myService.MyServiceImpl(),
|
|
36
|
-
* descriptor: myService.protoMetadata
|
|
37
|
-
* })
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* @param serviceOpts The options describing the service to be bound. See above for a detailed description.
|
|
41
|
-
* @returns An instance of this RestateServer
|
|
42
|
-
*/
|
|
43
|
-
bindService(serviceOpts: ServiceOpts): RestateServer;
|
|
44
|
-
bindKeyedRouter<M>(path: string, router: KeyedRouter<M>): RestateServer;
|
|
45
|
-
bindRouter<M>(path: string, router: UnKeyedRouter<M>): RestateServer;
|
|
46
|
-
/**
|
|
47
|
-
* Starts the Restate server and listens at the given port.
|
|
48
|
-
*
|
|
49
|
-
* If the port is undefined, this method will use the port set in the `PORT`
|
|
50
|
-
* environment variable. If that variable is undefined as well, the method will
|
|
51
|
-
* default to port 9080.
|
|
52
|
-
*
|
|
53
|
-
* This method's result promise never completes.
|
|
54
|
-
*
|
|
55
|
-
* This method is a shorthand for:
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* ```
|
|
59
|
-
* const httpServer = http2.createServer(restateServer);
|
|
60
|
-
* httpServer.listen(port);
|
|
61
|
-
* ```
|
|
62
|
-
*
|
|
63
|
-
* If you need to manually control the server lifecycle, we suggest to manually instantiate the http2 server and use this object as request handler.
|
|
64
|
-
*
|
|
65
|
-
* @param port The port to listen at. May be undefined (see above).
|
|
66
|
-
*/
|
|
67
|
-
listen(port?: number): Promise<void>;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Creates a Restate entrypoint based on a HTTP2 server. The entrypoint will listen
|
|
71
|
-
* for requests to the services at a specified port.
|
|
72
|
-
*
|
|
73
|
-
* This is the entrypoint to be used in most scenarios (standalone, Docker, Kubernetes, ...);
|
|
74
|
-
* any deployments that forwards requests to a network endpoint. The prominent exception is
|
|
75
|
-
* AWS Lambda, which uses the {@link restate_lambda_handler#lambdaApiGatewayHandler}
|
|
76
|
-
* function to create an entry point.
|
|
77
|
-
*
|
|
78
|
-
* After creating this endpoint, register services on this entrypoint via {@link RestateServer.bindService }
|
|
79
|
-
* and start it via {@link RestateServer.listen }.
|
|
80
|
-
*
|
|
81
|
-
* @example
|
|
82
|
-
* A typical entry point would look like this:
|
|
83
|
-
* ```
|
|
84
|
-
* import * as restate from "@restatedev/restate-sdk";
|
|
85
|
-
*
|
|
86
|
-
* export const handler = restate
|
|
87
|
-
* .createServer()
|
|
88
|
-
* .bindService({
|
|
89
|
-
* service: "MyService",
|
|
90
|
-
* instance: new myService.MyServiceImpl(),
|
|
91
|
-
* descriptor: myService.protoMetadata,
|
|
92
|
-
* })
|
|
93
|
-
* .listen(8000);
|
|
94
|
-
* ```
|
|
95
|
-
*/
|
|
96
|
-
export declare function createServer(): RestateServer;
|
|
97
|
-
//# sourceMappingURL=restate_server.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"restate_server.d.ts","sourceRoot":"","sources":["../../src/server/restate_server.ts"],"names":[],"mappings":";AAaA,OAAc,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAMvE,OAAO,EAAqB,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAOvE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,aAAa;IAE5B,CAAC,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,aAAa,CAAC;IAErD,eAAe,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC;IAExE,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC;IAErE;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,YAAY,IAAI,aAAa,CAmC5C"}
|
package/dist/utils/logger.d.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/**
|
|
3
|
-
* Simple extension of the Console interface, to add debug logging per message.
|
|
4
|
-
* Because per-message logging can be very expensive, it is not active by default.
|
|
5
|
-
*
|
|
6
|
-
* This method also supports lazy construction of stringified message object,
|
|
7
|
-
* because constructing that stringified representation is even more expensive.
|
|
8
|
-
*/
|
|
9
|
-
export interface RestateConsole extends Console {
|
|
10
|
-
/**
|
|
11
|
-
* Called to log per-invocation debug messages.
|
|
12
|
-
*
|
|
13
|
-
* Under load, this can generate a large amount of log output. Due to that, this
|
|
14
|
-
* function by default logs only if the 'NODE_ENV' environment is not set to
|
|
15
|
-
* 'production', or if explicitly configured via the restate 'RESTATE_DEBUG_LOGGING'
|
|
16
|
-
* environment variable. See {@link DEBUG_LOG_LEVEL} for details.
|
|
17
|
-
*/
|
|
18
|
-
debugInvokeMessage(invocationInfo: string, logMessage: string): void;
|
|
19
|
-
/**
|
|
20
|
-
* Called to log per-jounral action debug messages.
|
|
21
|
-
*
|
|
22
|
-
* Under load, this can generate an insane amount of log output. Due to that, this
|
|
23
|
-
* function doesn't actually output log entries unless configured via the 'RESTATE_DEBUG_LOGGING'
|
|
24
|
-
* environment variable. See {@link DEBUG_LOG_LEVEL} for details.
|
|
25
|
-
*/
|
|
26
|
-
debugJournalMessage(invocationInfo: string, logMessage: string, messageType?: bigint, message?: any): void;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* The environment variable which is read to determine the debug log settings.
|
|
30
|
-
*/
|
|
31
|
-
export declare const DEBUG_LOGGING_ENV = "RESTATE_DEBUG_LOGGING";
|
|
32
|
-
/**
|
|
33
|
-
* The values for the {@link DEBUG_LOGGING_ENV} variable.
|
|
34
|
-
*/
|
|
35
|
-
export declare enum DEBUG_LOG_LEVEL {
|
|
36
|
-
/** No debug logging at all. Good for performance and avoid per-invocation log volume */
|
|
37
|
-
OFF = "OFF",
|
|
38
|
-
/** Logs debug information for every Restate function invocation. */
|
|
39
|
-
INVOKE = "INVOKE",
|
|
40
|
-
/** Logs debug information for every Restate effect (=journal event) inside an invocation,
|
|
41
|
-
* like RPC, state access, sideEffect, ... */
|
|
42
|
-
JOURNAL = "JOURNAL",
|
|
43
|
-
/** Logs debug information for every Restate effect (=journal event) inside an invocation,
|
|
44
|
-
* like RPC, state access, sideEffect, ... Additionally, this adds a JSON representation
|
|
45
|
-
* of the journal message to the log. */
|
|
46
|
-
JOURNAL_VERBOSE = "JOURNAL_VERBOSE"
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* The RestateLogger lets us add some extra information to logging statements:
|
|
50
|
-
* [restate] [timestamp] INFO/WARN/ERROR/DEBUG/TRACE <log-message>.
|
|
51
|
-
*
|
|
52
|
-
* It also adds the methods {@link RestateConsole.debugInvokeMessage} and *
|
|
53
|
-
* {@link RestateConsole.debugJournalMessage} for optional intensive (per
|
|
54
|
-
* invocation / per journal message) logging.
|
|
55
|
-
*
|
|
56
|
-
* We don't override the console here, to make sure that this only applies to Restate
|
|
57
|
-
* log lines, and not to logging from application code.
|
|
58
|
-
*/
|
|
59
|
-
export declare const rlog: RestateConsole;
|
|
60
|
-
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":";AAiBA;;;;;;GAMG;AACH,MAAM,WAAW,cAAe,SAAQ,OAAO;IAC7C;;;;;;;OAOG;IACH,kBAAkB,CAAC,cAAc,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAErE;;;;;;OAMG;IACH,mBAAmB,CACjB,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAClB,WAAW,CAAC,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,GAAG,GACZ,IAAI,CAAC;CACT;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,0BAA0B,CAAC;AAEzD;;GAEG;AACH,oBAAY,eAAe;IACzB,wFAAwF;IACxF,GAAG,QAAQ;IAEX,oEAAoE;IACpE,MAAM,WAAW;IAEjB;kDAC8C;IAC9C,OAAO,YAAY;IAEnB;;6CAEyC;IACzC,eAAe,oBAAoB;CACpC;AAiGD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,IAAI,gBAAmC,CAAC"}
|