proto/

directory
v0.5.0-nightly.20221224 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2022 License: Apache-2.0

README

Conduit API Proto files

This folder contains protobuf files that define the Conduit gRPC API and consequently also the HTTP API via the grpc-gateway.

Client code

The client code for Conduit's API is available remotely generated via Buf's Remote Generation. Remote code generation is triggered via a GitHub workflow defined here.

To use the client code, firstly run:

go get go.buf.build/conduitio/conduit/conduitio/conduit

Here's an example usage of Conduit's client code:

package main

import (
	"context"
	apiv1 "go.buf.build/conduitio/conduit/conduitio/conduit/api/v1"
	"google.golang.org/grpc"
)

func main() {
	var cc grpc.ClientConnInterface = ...
	ps := apiv1.NewPipelineServiceClient(cc)
	pipeline, err := ps.GetPipeline(
		context.Background(),
		&apiv1.GetPipelineRequest{Id: "pipeline-id-here"},
	)
}

Development

We use Buf to generate the Go code. The code is locally generated, and can be found in gen. The generated code needs to be committed.

The code needs to be generated after changes to the .proto files have been made. To do so run make proto-generate from the root of this repository.

Directories

Path Synopsis
gen
api/v1
Package apiv1 is a reverse proxy.
Package apiv1 is a reverse proxy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL