Μετάβαση στο περιεχόμενο

CorrelationFrom

Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.

const CorrelationFrom: object

Defined in: decorators/with-correlation.decorator.ts:257

Pre-built extraction presets for WithCorrelation, for transports whose handlers receive the correlation id in metadata rather than in the payload.

For transports that carry it in the payload (BullMQ, PostgreSQL NOTIFY), use the bare @WithCorrelation() or a path; for any other shape, an extract function.

readonly grpc: (key) => CorrelationDecoratorOptions

gRPC — extracts from gRPC Metadata (second argument).

In gRPC handlers the signature is (data, metadata, call).

string = DEFAULT_CORRELATION_HEADER

Metadata key. Defaults to 'x-correlation-id'.

CorrelationDecoratorOptions

class Users {
// gRPC (@grpc/grpc-js): (request, metadata)
@WithCorrelation(CorrelationFrom.grpc())
async findOne(request: FindOneRequest, metadata: Metadata) {}
}