All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.volcengine.model.tls.request.RequestBuilder Maven / Gradle / Ivy

There is a newer version: 1.0.192
Show newest version
package com.volcengine.model.tls.request;

import com.volcengine.model.tls.pb.PutLogRequest;
import com.volcengine.model.tls.producer.BatchLog;

import static com.volcengine.model.tls.Const.LZ4;

public class RequestBuilder {
    private RequestBuilder() {
    }

    public static PutLogsRequest buildFromBatch(BatchLog batchLog) {
        PutLogRequest.LogGroupList logGroupList = PutLogRequest.LogGroupList.newBuilder().
                mergeFrom(batchLog.getLogGroupList()).build();
        BatchLog.BatchKey batchKey = batchLog.getBatchKey();
        return new PutLogsRequest(logGroupList, batchKey.getTopicId(), batchKey.getShardHash(), LZ4);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy