A simple grpc-gateway powered remote control API for Khiops.
Running main.go
starts a web server on https://0.0.0.0:11000/. You can configure
the port used with the $PORT
environment variable, and to serve on HTTP set
$SERVE_HTTP=true
.
An OpenAPI UI is served on https://0.0.0.0:11000/.
Generating the client/server files requires the protoc
protobuf compiler.
Please install it according to the
installation instructions
for your specific platform.
This is only needed to modify the service. For clients simply using the service, skip to the next section.
- Install the generate dependencies with
make install
. This will installprotoc-gen-go
,protoc-gen-grpc-gateway
,protoc-gen-swagger
andstatik
which are necessary for us to generate the Go, swagger and static files. - Generate the files with
make generate
. If you encounter an error here, make sure you've installedprotoc
and it is accessible in your$PATH
, and make sure you've performed step 1. - Finally you can run the web server with
go run main.go
.
The service exposes both gRPC and REST endpoint. Several usage examples are given here.
To build a custom client using your favourite language, lookup the relevant gRPC documentation (https://grpc.io/docs/quickstart/) and create your client from the proto service definition.