Перейти к содержимому
Русский

GrpcServerOptionsBuilder

Это содержимое пока не доступно на вашем языке.

Defined in: src/io/broker/GrpcServerOptions.ts:46

new GrpcServerOptionsBuilder(): GrpcServerOptionsBuilder

GrpcServerOptionsBuilder

BrokerOptionsBuilder<GrpcServerOptionsType>.constructor

build(): Partial<T>

Defined in: src/util/OptionsBuilder.ts:51

Snapshot the set fields as an independent Partial<T> (own props only).

Partial<T>

BrokerOptionsBuilder.build


withBind(bind): this

Defined in: src/io/broker/GrpcServerOptions.ts:68

Bind address ('0.0.0.0:50051').

string

this


withCircuitBreaker(failureThreshold, resetMs): this

Defined in: src/io/broker/BrokerOptions.ts:125

Circuit breaker around connect attempts.

number

number

this

BrokerOptionsBuilder.withCircuitBreaker


withCredentials(credentials): this

Defined in: src/io/broker/GrpcServerOptions.ts:78

TLS credentials. When omitted the server binds insecurely.

NonNullable<{ kind: "insecure"; } | { cert: Uint8Array; key: Uint8Array; kind: "tls"; rootCerts?: Uint8Array<ArrayBufferLike>; } | undefined>

this


withHandlers(handlers): this

Defined in: src/io/broker/GrpcServerOptions.ts:73

Method-name → handler mapping. Absent methods are UNIMPLEMENTED.

Readonly<Record<string, GrpcHandler>>

this


withHealth(health): this

Defined in: src/io/broker/GrpcServerOptions.ts:88

Serve grpc.health.v1.Health, answering Check from health’s readiness checks. Omit the call to leave the health service off — see GrpcServerOptionsType.health for why enabling it requires naming a status source.

HealthCheckRegistry

this


withOutboundBuffer(limit): this

Defined in: src/io/broker/BrokerOptions.ts:130

Outbound buffer size (messages held while disconnected). Default 1000; 0 = fail-fast.

number

this

BrokerOptionsBuilder.withOutboundBuffer


withPackageName(packageName): this

Defined in: src/io/broker/GrpcServerOptions.ts:58

gRPC package name.

string

this


withProtoPath(protoPath): this

Defined in: src/io/broker/GrpcServerOptions.ts:53

Path to the .proto file (or array of paths).

string | readonly string[]

this


withReconnect(policy): this

Defined in: src/io/broker/BrokerOptions.ts:120

Reconnect policy (or false to disable auto-reconnect).

false | { factor?: number; initialDelayMs?: number; maxAttempts?: number; maxDelayMs?: number; } | undefined

false


{ factor?: number; initialDelayMs?: number; maxAttempts?: number; maxDelayMs?: number; }

number

number

number

Cap on retry attempts. Default: Infinity (retry forever).

number


undefined

this

BrokerOptionsBuilder.withReconnect


withServiceName(serviceName): this

Defined in: src/io/broker/GrpcServerOptions.ts:63

Service name.

string

this


static create(): GrpcServerOptionsBuilder

Defined in: src/io/broker/GrpcServerOptions.ts:48

Start a fresh builder. Equivalent to new GrpcServerOptionsBuilder().

GrpcServerOptionsBuilder