Skip to content

Commit

Permalink
try git submodule for proto
Browse files Browse the repository at this point in the history
  • Loading branch information
dudo committed Feb 8, 2024
1 parent 434eb1d commit 614ddc8
Show file tree
Hide file tree
Showing 10 changed files with 1,809 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "proto"]
path = proto
url = https://github.com/orbservability/proto.git
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,24 @@
# This is based on Debian and includes standard C libraries.
FROM golang:1.21 AS builder

ARG PROTOC_VERSION=25.2

RUN apt-get update && apt-get install -y unzip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Set the working directory outside $GOPATH to enable the support for modules.
WORKDIR /usr/src/app

# Install protoc
RUN wget -nv https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-aarch_64.zip && \
unzip protoc-${PROTOC_VERSION}-linux-aarch_64.zip -d /usr/local && \
rm protoc-${PROTOC_VERSION}-linux-aarch_64.zip
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

ENV PATH $PATH:$(go env GOPATH)/bin

# Copy the Go Modules manifests and download the dependencies.
# This is done before copying the code to leverage Docker cache layers.
COPY go.* ./
Expand Down
5 changes: 5 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@ services:
- gomod:/go/pkg/mod
- ${LOCAL_DEP_PATH:-..}:/local

protoc:
<<: *go
entrypoint: protoc
command: -h

volumes:
gomod: {}
3 changes: 2 additions & 1 deletion pkg/eventgateway/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package eventgateway
import (
"context"

pb "github.com/orbservability/schemas/v1"
pb "orbservability/observer/pkg/gen/pb/v1"

"google.golang.org/grpc"
)

Expand Down
85 changes: 85 additions & 0 deletions pkg/gen/pb/v1/event_gateway_service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

144 changes: 144 additions & 0 deletions pkg/gen/pb/v1/event_gateway_service_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 614ddc8

Please sign in to comment.