// send forwards a given ObservationBatch to Analyzer using the AddObservations
// interface.
send forwards a given ObservationBatch to Analyzer using the AddObservations
interface.
// send forwards a given ObservationBatch to Analyzer using the AddObservations // interface .
func (g *GrpcAnalyzerTransport) send(obBatch *cobalt.ObservationBatch) error {
	if g == nil {
		panic("GrpcAnalyzerTransport is not set.")
	}
	if obBatch == nil {
		return grpc.Errorf(codes.InvalidArgument, "ObservationBatch is not set.")
	}
	glog.V(3).Infof("Sending batch of %d observations to the analyzer.", len(obBatch.GetEncryptedObservation()))
	_, err := g.client.AddObservations(context.Background(), obBatch)
	if err != nil {
		return grpc.Errorf(codes.Internal, "AddObservations call failed with error: %v", err)
	}
	glog.V(4).Infoln("ObservationBatch dispatched successfully.")
	return nil
}
func ( g * GrpcAnalyzerTransport ) send ( obBatch * cobalt . ObservationBatch ) error { if g == nil { panic ( " " ) } if obBatch == nil { return grpc . Errorf ( codes . InvalidArgument , " " ) } glog . V ( 3 ) . Infof ( " " , len ( obBatch . GetEncryptedObservation ( ) ) ) _ , err := g . client . AddObservations ( context . Background ( ) , obBatch ) if err != nil { return grpc . Errorf ( codes . Internal , " " , err ) } glog . V ( 4 ) . Infoln ( " " ) return nil }
send forwards a given ObservationBatch to Analyzer using the AddObservations
interface.
send forwards a given ObservationBatch to Analyzer using the AddObservations interface .
// Analyzer forwards a new context, so as to break the context correlation // between originating request and the shuffled request that is being // forwarded.