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