mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-23 03:49:08 +00:00
maestro connection with microservices - clients and modules
This commit is contained in:
@@ -1,17 +1,22 @@
|
||||
// import { join } from 'path';
|
||||
// import { ClientOptions, Transport } from '@nestjs/microservices';
|
||||
import { ClientOptions, Transport } from '@nestjs/microservices';
|
||||
import { TransformationProtofile } from '@victorradael/protospack';
|
||||
import { credentials } from '@grpc/grpc-js';
|
||||
|
||||
// export const TransformationsClientConfiguration: ClientOptions = {
|
||||
// transport: Transport.GRPC,
|
||||
// options: {
|
||||
// //url: `${process.env.USERS_SVC_URL}:${process.env.USERS_SVC_PORT}`,
|
||||
// url: `127.0.0.1:50054`,
|
||||
// package: 'transformation',
|
||||
// protoPath: join(__dirname, '..', 'proto', 'transformation.proto'),
|
||||
// loader: {
|
||||
// enums: String,
|
||||
// objects: true,
|
||||
// arrays: true,
|
||||
// },
|
||||
// },
|
||||
// };
|
||||
export class TransformationsClientConfiguration {
|
||||
config(): ClientOptions {
|
||||
return {
|
||||
transport: Transport.GRPC,
|
||||
options: {
|
||||
url: process.env.TRFACTORY_URL,
|
||||
package: 'transformation',
|
||||
// credentials: credentials.createSsl(),
|
||||
protoPath: TransformationProtofile,
|
||||
loader: {
|
||||
enums: String,
|
||||
objects: true,
|
||||
arrays: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user