Last active
February 29, 2020 17:11
-
-
Save jwulf/9e44a5ddc0b2e124943edd30bee04734 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
export class GrpcMiddleware { | |
private grpcClient: GrpcClient | |
private characteristics: Characteristics | |
private log: ZBLogger | |
constructor({ | |
profile, | |
config, | |
}: { | |
profile: GrpcConnectionProfile | |
config: GrpcClientCtor | |
}) { | |
this.grpcClient = new GrpcClient(config) | |
this.characteristics = ConnectionCharacteristics[profile] | |
this.log = new ZBLogger({ | |
color: chalk.green, | |
id: 'gRPC Channel', | |
loglevel: config.loglevel, | |
namespace: config.namespace, | |
pollInterval: config.options.longPoll!, | |
stdout: config, | |
taskType: config.tasktype, | |
}) | |
} | |
public getGrpcClient() { | |
re turn this.grpcClient | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment