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

tech.ytsaurus.client.discovery.DiscoveryServiceMethodTable Maven / Gradle / Ivy

package tech.ytsaurus.client.discovery;

import java.util.function.Supplier;

import com.google.protobuf.MessageLite;
import com.google.protobuf.Parser;
import tech.ytsaurus.TReqGetGroupMeta;
import tech.ytsaurus.TReqHeartbeat;
import tech.ytsaurus.TReqListGroups;
import tech.ytsaurus.TReqListMembers;
import tech.ytsaurus.TRspGetGroupMeta;
import tech.ytsaurus.TRspHeartbeat;
import tech.ytsaurus.TRspListGroups;
import tech.ytsaurus.TRspListMembers;
import tech.ytsaurus.client.RpcMethodDescriptor;

public class DiscoveryServiceMethodTable {
    public static final RpcMethodDescriptor LIST_MEMBERS =
            clientServiceMethod("ListMembers", TReqListMembers::newBuilder, TRspListMembers.parser());

    public static final RpcMethodDescriptor GET_GROUP_META =
            clientServiceMethod("GetGroupMeta", TReqGetGroupMeta::newBuilder, TRspGetGroupMeta.parser());

    public static final RpcMethodDescriptor HEARTBEAT =
            clientServiceMethod("Heartbeat", TReqHeartbeat::newBuilder, TRspHeartbeat.parser());

    public static final RpcMethodDescriptor LIST_GROUPS =
            clientServiceMethod("ListGroups", TReqListGroups::newBuilder, TRspListGroups.parser());

    private DiscoveryServiceMethodTable() {
    }

    public static 
    RpcMethodDescriptor clientServiceMethod(
            String name,
            Supplier reqSupplier,
            Parser parser
    ) {
        return new RpcMethodDescriptor<>(
                0,
                "DiscoveryClientService",
                name,
                reqSupplier,
                parser);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy