Last active
February 29, 2020 19:15
-
-
Save jwulf/43e8b92ebf14e209542205c3f35af275 to your computer and use it in GitHub Desktop.
A code sample from the article https://joshwulf.com/blog/2020/03/camunda-cloud-connection-2/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private createInterceptedGrpcClient(config: GrpcClientCtor) { | |
| const grpcClient = new GrpcClient(config) | |
| grpcClient.on(MiddlewareSignals.Log.Debug, this.debug) | |
| grpcClient.on(MiddlewareSignals.Log.Info, this.info) | |
| grpcClient.on(MiddlewareSignals.Log.Error, this.error) | |
| grpcClient.on(MiddlewareSignals.Event.Error, this.emitError) | |
| grpcClient.on(MiddlewareSignals.Event.Ready, this.emitReady) | |
| return grpcClient | |
| } | |
| private info = (msg: any) => this.log.info(msg) | |
| private debug = (msg: any) => this.log.debug(msg) | |
| private error = (msg: any) => this.log.error(msg) | |
| private emitError = () => this.grpcClient.emit('error') | |
| private emitReady = () => this.grpcClient.emit('ready') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment