Skip to content

Commit

Permalink
HTTP support in http-recorder (#527)
Browse files Browse the repository at this point in the history
  • Loading branch information
takezoe committed Jul 2, 2019
1 parent a283f70 commit 4365522
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,21 @@ object HttpRecorder extends LogSupport {
)

debug(s"dest: ${recorderConfig.destAddress}")
val destClient =
val clientBuilder =
ClientBuilder()
.stack(Http.client)
.name(s"airframe-http-recorder-proxy")
.dest(recorderConfig.destAddress.hostAndPort)
.tls(SSLContext.getDefault)
.noFailureAccrual
.keepAlive(true)
.retryPolicy(RetryPolicy.tries(3, RetryPolicy.TimeoutAndWriteExceptionsOnly))
.build()


val destClient = (if(recorderConfig.destAddress.port == 443) {
clientBuilder.tls(SSLContext.getDefault)
} else {
clientBuilder
}).build()

new HttpRecorderServer(recorder, finagleConfig, new RecordingService(recorder, destClient))
}
Expand Down

0 comments on commit 4365522

Please sign in to comment.