Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ClientGrpcProxy

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected Readonly clients

clients: Map<string, any> = new Map<string, any>()

Protected deserializer

deserializer: ProducerDeserializer

Protected grpcClients

grpcClients: any[] = []

Protected Readonly logger

logger: Logger = new Logger(ClientProxy.name)

Protected Readonly options

options: GrpcOptions["options"]

Protected routingMap

routingMap: Map<string, Function> = new Map<string, Function>()

Protected serializer

serializer: ProducerSerializer

Protected Readonly url

url: string

Methods

Protected assignPacketId

close

  • close(): void

connect

  • connect(): Promise<any>

Protected connect$

  • connect$(instance: any, errorEvent?: string, connectEvent?: string): Observable<any>

createClientByServiceName

  • createClientByServiceName(name: string): any

createClients

  • createClients(): any[]

Protected createObserver

  • createObserver<T>(observer: Observer<T>): (packet: WritePacket) => void

createServiceMethod

  • createServiceMethod(client: any, methodName: string): (...args: unknown[]) => Observable<unknown>
  • Parameters

    • client: any
    • methodName: string

    Returns (...args: unknown[]) => Observable<unknown>

      • (...args: unknown[]): Observable<unknown>
      • Parameters

        • Rest ...args: unknown[]

        Returns Observable<unknown>

createStreamServiceMethod

  • createStreamServiceMethod(client: unknown, methodName: string): (...args: any[]) => Observable<any>
  • Parameters

    • client: unknown
    • methodName: string

    Returns (...args: any[]) => Observable<any>

      • (...args: any[]): Observable<any>
      • Parameters

        • Rest ...args: any[]

        Returns Observable<any>

createUnaryServiceMethod

  • createUnaryServiceMethod(client: any, methodName: string): (...args: any[]) => Observable<any>

Protected dispatchEvent

  • dispatchEvent(packet: any): Promise<any>

emit

  • emit<TResult, TInput>(pattern: any, data: TInput): Observable<TResult>

Protected getClient

  • getClient(name: string): any

getClientByServiceName

  • getClientByServiceName<T>(name: string): T

getKeepaliveOptions

  • getKeepaliveOptions(): {}

Protected getOptionsProp

  • getOptionsProp<T, K>(obj: T, prop: K, defaultValue?: T[K]): T[K]

getService

  • getService<T>(name: string): T

Protected initializeDeserializer

  • initializeDeserializer(options: ClientOptions["options"]): void

Protected initializeSerializer

  • initializeSerializer(options: ClientOptions["options"]): void

loadProto

  • loadProto(): any

lookupPackage

  • lookupPackage(root: any, packageName: string): any

Protected normalizePattern

  • normalizePattern(pattern: MsPattern): string

Protected publish

  • publish(packet: any, callback: (packet: any) => any): any

send

  • send<TResult, TInput>(pattern: any, data: TInput): Observable<TResult>

Generated using TypeDoc