mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-01 13:39:08 +00:00
Client Refactor
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
import { InputPackages, InputProtoFilePath } from 'protospack';
|
||||
|
||||
export class InputsGrpcClient {
|
||||
public name = 'InputsGrpcClient';
|
||||
private config: GrpcOptions = {
|
||||
transport: Transport.GRPC,
|
||||
options: {
|
||||
@@ -22,7 +23,7 @@ export class InputsGrpcClient {
|
||||
},
|
||||
};
|
||||
providerOptions: ClientProviderOptions = {
|
||||
name: 'InputsGrpcClient',
|
||||
name: this.name,
|
||||
...this.config,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import {
|
||||
objectCamelToSnake,
|
||||
} from 'src/utils/CaseConverter';
|
||||
import { IIdRequest, UpdateInputRequest } from './dtos/old_interfaces';
|
||||
import { InputsGrpcClient } from './inputs-client.config';
|
||||
|
||||
@Injectable()
|
||||
|
||||
@@ -231,7 +232,7 @@ export class InputsService {
|
||||
constructor(
|
||||
@Inject(DadosferaLogger)
|
||||
dadosferaLogger: DadosferaLogger,
|
||||
@Inject('InputsGrpcClient') private readonly grpcClient: ClientGrpc,
|
||||
@Inject(InputsGrpcClient.name) private readonly grpcClient: ClientGrpc,
|
||||
) {
|
||||
this.logger = dadosferaLogger.logger;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user