mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-17 09:49:07 +00:00
28 lines
666 B
TypeScript
28 lines
666 B
TypeScript
import { ClientOptions, Transport } from '@nestjs/microservices';
|
|
import {
|
|
PipelinePackages,
|
|
PipelineProtoFilePath,
|
|
} from 'protospack';
|
|
import { credentials } from '@grpc/grpc-js';
|
|
|
|
export class PipelinesClientConfiguration {
|
|
config(): ClientOptions {
|
|
return {
|
|
transport: Transport.GRPC,
|
|
options: {
|
|
url: process.env.PIFACTORY_URL,
|
|
package: PipelinePackages,
|
|
credentials: process.env.LOCAL_ENV
|
|
? undefined
|
|
: credentials.createSsl(),
|
|
protoPath: PipelineProtoFilePath,
|
|
loader: {
|
|
enums: String,
|
|
objects: true,
|
|
arrays: true,
|
|
},
|
|
},
|
|
};
|
|
}
|
|
}
|