Skip to content

[IDL]Add drpcc tool to compile the proto file to service interface. #34

@jovany-wang

Description

@jovany-wang

Add a compile tool of drpc to generate a java file from the following proto file.

# proto file
service DstDictService {
    rpc put(PutRequest) returns (PutResponse);
}

the auto-generated java file:

// java file
/// Auto-generated file by drpcc
package com.distkv.dst.rpc.service;

import com.distkv.dst.rpc.protobuf.generated.CommonProtocol;
import com.distkv.dst.rpc.protobuf.generated.ListProtocol;
import java.util.concurrent.CompletableFuture;

public interface DstListService {

  CompletableFuture<ListProtocol.PutResponse> put(ListProtocol.PutRequest request);

}

And note that we can use antlr4 to write the parser of drpcc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions