
io.p8e.grpc.client.ChaincodeClient.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of p8e-common Show documentation
Show all versions of p8e-common Show documentation
A collection of services and libraries that iteract and run Provenance Java based contracts.
The newest version!
package io.p8e.grpc.client
import io.grpc.ManagedChannel
import io.p8e.proto.ChaincodeGrpc
import io.p8e.proto.Domain.SpecRequest
import java.util.concurrent.TimeUnit
class ChaincodeClient(
channel: ManagedChannel,
interceptor: ChallengeResponseInterceptor,
private val deadlineMs: Long
) {
private val client = ChaincodeGrpc.newBlockingStub(channel)
.withInterceptors(interceptor)
fun addSpec(
specRequest: SpecRequest
) {
client.withDeadlineAfter(deadlineMs, TimeUnit.MILLISECONDS)
.addSpec(specRequest)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy