GithubHelp home page GithubHelp logo

isabella232 / grpc-connect Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mulesoft-labs/grpc-connect

0.0 0.0 0.0 1.05 MB

Set of tools and plugins to create OOTB Mule 4 Connectors from Protobuf definitions and connect agains gRPC Servers

Java 100.00%

grpc-connect's Introduction

gRPC Mule Connect

Set of tools and plugins to create OOTB Mule 4 Connectors from Protobuf definitions and connect agains gRPC Servers

proto-to-mule

How to use

Clone repository and install it on your local M2 repo doing mvn clean install on the root of the project.

This action will install everything necessary to create your connectors based on gRPC Specifications.

Connector Structure

To create a connector based on gRPC is necessary to create an empty Maven project with the following POM file:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.mulesoft.connectors</groupId>
        <artifactId>gRPC-connect-parent-pom</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>

    <groupId>com.mulesoft.connectors</groupId>
    <artifactId>hello-world-grpc-connector</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>mule-extension</packaging>

    <name>Hello World gRPC Based Connector</name>

</project>

Where the important thing is the Parent POM where all the logic of creating gRPC based connector lives.

    <parent>
        <groupId>com.mulesoft.connectors</groupId>
        <artifactId>gRPC-connect-parent-pom</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>

Placing the Proto file

The proto file should be placed on src/main/proto.

THATS ALL!! ๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰

Yes, I'm not lying this is all you need to do for having a gRPC based connector.

Just mvn clean install on the connector project, copy the GAV (GroupId, ArtifactId and Version) and add the mule-plugin classifier, based on our example of above would be:

<dependency>
    <groupId>com.mulesoft.connectors</groupId>
    <artifactId>hello-world-grpc-connector</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <classifier>mule-plugin</classifier>
</dependency>

Copy and paste this inside of the Mule application POM file in Studio and enjoy!!!

grpc-connect's People

Contributors

engineering-services-bot avatar estebanwasinger avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.