This is a sample Ballerina connector for demonstration purpose.
Version | |
---|---|
Ballerina Language | Swan Lake Beta 3 |
Java Development Kit (JDK) | 11 |
- Refer to the Setting up Ballerina guide to download and install Ballerina.
- Clone the ballerina-connector-quickstart GitHub repository.
- Move inside to
ballerina-connector-quickstart/connector
directory and execute$ bal build connector
. It should compile the source, run the tests and generates the executable as follows:
Compiling source
ldclakmal/connector:1.0.0
Running Tests
connector
[pass] testMax
1 passing
0 failing
0 skipped
Generating executable
target/bin/connector.jar
Import the ldclakmal/connector
module into your Ballerina project and check the usage of sample max
function.
import ballerina/io;
import ldclakmal/connector;
public function main() {
int maxNo = connector:max(2, 10);
io:println(maxNo);
}