import Protocol from '../../../agent/protocol/Protocol' ; import HeartbeatClient from '../../../agent/protocol/grpc/clients/HeartbeatClient' ; import TraceReportClient from '../../../agent/protocol/grpc/clients/TraceReportClient' ; export default class GrpcProtocol implements Protocol { private readonly heartbeatClient : HeartbeatClient ; private readonly traceReportClient : TraceReportClient ; constructor ( ) { this . heartbeatClient = new HeartbeatClient ( ) ; this . traceReportClient = new TraceReportClient ( ) ; } get isConnected ( ) : boolean { return this . heartbeatClient . isConnected && this . traceReportClient . isConnected ; } heartbeat ( ) { this . heartbeatClient . start ( ) ; return this ; } report ( ) { this . traceReportClient . start ( ) ; return this ; } }