GrpcServerOptionsBuilder
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Defined in: src/io/broker/GrpcServerOptions.ts:46
Extends
Section titled “Extends”BrokerOptionsBuilder<GrpcServerOptionsType>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new GrpcServerOptionsBuilder():
GrpcServerOptionsBuilder
Returns
Section titled “Returns”GrpcServerOptionsBuilder
Inherited from
Section titled “Inherited from”BrokerOptionsBuilder<GrpcServerOptionsType>.constructor
Methods
Section titled “Methods”build()
Section titled “build()”build():
Partial<T>
Defined in: src/util/OptionsBuilder.ts:51
Snapshot the set fields as an independent Partial<T> (own props only).
Returns
Section titled “Returns”Partial<T>
Inherited from
Section titled “Inherited from”BrokerOptionsBuilder.build
withBind()
Section titled “withBind()”withBind(
bind):this
Defined in: src/io/broker/GrpcServerOptions.ts:68
Bind address ('0.0.0.0:50051').
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”this
withCircuitBreaker()
Section titled “withCircuitBreaker()”withCircuitBreaker(
failureThreshold,resetMs):this
Defined in: src/io/broker/BrokerOptions.ts:125
Circuit breaker around connect attempts.
Parameters
Section titled “Parameters”failureThreshold
Section titled “failureThreshold”number
resetMs
Section titled “resetMs”number
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”BrokerOptionsBuilder.withCircuitBreaker
withCredentials()
Section titled “withCredentials()”withCredentials(
credentials):this
Defined in: src/io/broker/GrpcServerOptions.ts:78
TLS credentials. When omitted the server binds insecurely.
Parameters
Section titled “Parameters”credentials
Section titled “credentials”NonNullable<{ kind: "insecure"; } | { cert: Uint8Array; key: Uint8Array; kind: "tls"; rootCerts?: Uint8Array<ArrayBufferLike>; } | undefined>
Returns
Section titled “Returns”this
withHandlers()
Section titled “withHandlers()”withHandlers(
handlers):this
Defined in: src/io/broker/GrpcServerOptions.ts:73
Method-name → handler mapping. Absent methods are UNIMPLEMENTED.
Parameters
Section titled “Parameters”handlers
Section titled “handlers”Readonly<Record<string, GrpcHandler>>
Returns
Section titled “Returns”this
withHealth()
Section titled “withHealth()”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.
Parameters
Section titled “Parameters”health
Section titled “health”Returns
Section titled “Returns”this
withOutboundBuffer()
Section titled “withOutboundBuffer()”withOutboundBuffer(
limit):this
Defined in: src/io/broker/BrokerOptions.ts:130
Outbound buffer size (messages held while disconnected). Default 1000; 0 = fail-fast.
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”BrokerOptionsBuilder.withOutboundBuffer
withPackageName()
Section titled “withPackageName()”withPackageName(
packageName):this
Defined in: src/io/broker/GrpcServerOptions.ts:58
gRPC package name.
Parameters
Section titled “Parameters”packageName
Section titled “packageName”string
Returns
Section titled “Returns”this
withProtoPath()
Section titled “withProtoPath()”withProtoPath(
protoPath):this
Defined in: src/io/broker/GrpcServerOptions.ts:53
Path to the .proto file (or array of paths).
Parameters
Section titled “Parameters”protoPath
Section titled “protoPath”string | readonly string[]
Returns
Section titled “Returns”this
withReconnect()
Section titled “withReconnect()”withReconnect(
policy):this
Defined in: src/io/broker/BrokerOptions.ts:120
Reconnect policy (or false to disable auto-reconnect).
Parameters
Section titled “Parameters”policy
Section titled “policy”false | { factor?: number; initialDelayMs?: number; maxAttempts?: number; maxDelayMs?: number; } | undefined
false
Type Literal
Section titled “Type Literal”{ factor?: number; initialDelayMs?: number; maxAttempts?: number; maxDelayMs?: number; }
factor?
Section titled “factor?”number
initialDelayMs?
Section titled “initialDelayMs?”number
maxAttempts?
Section titled “maxAttempts?”number
Cap on retry attempts. Default: Infinity (retry forever).
maxDelayMs?
Section titled “maxDelayMs?”number
undefined
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”BrokerOptionsBuilder.withReconnect
withServiceName()
Section titled “withServiceName()”withServiceName(
serviceName):this
Defined in: src/io/broker/GrpcServerOptions.ts:63
Service name.
Parameters
Section titled “Parameters”serviceName
Section titled “serviceName”string
Returns
Section titled “Returns”this
create()
Section titled “create()”
staticcreate():GrpcServerOptionsBuilder
Defined in: src/io/broker/GrpcServerOptions.ts:48
Start a fresh builder. Equivalent to new GrpcServerOptionsBuilder().
Returns
Section titled “Returns”GrpcServerOptionsBuilder
