Skip to content

Commit 1b5b6bf

Browse files
amir20claude
andcommitted
refactor: move cloud proto generated code to public proto/cloud package
Enables external projects (Doligence) to import the cloud proto types directly from the Dozzle module instead of maintaining local copies. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent dca9f17 commit 1b5b6bf

6 files changed

Lines changed: 7 additions & 7 deletions

File tree

internal/cloud/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"sync"
1111
"time"
1212

13-
"github.com/amir20/dozzle/internal/cloud/pb"
13+
pb "github.com/amir20/dozzle/proto/cloud"
1414
"github.com/amir20/dozzle/internal/container"
1515
"github.com/amir20/dozzle/internal/notification/dispatcher"
1616
"github.com/rs/zerolog/log"

internal/cloud/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"testing"
66

7-
"github.com/amir20/dozzle/internal/cloud/pb"
7+
pb "github.com/amir20/dozzle/proto/cloud"
88
"github.com/amir20/dozzle/internal/container"
99
container_support "github.com/amir20/dozzle/internal/support/container"
1010
"github.com/stretchr/testify/assert"

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var content embed.FS
3434
var certs embed.FS
3535

3636
//go:generate protoc --go_out=. --go-grpc_out=. --proto_path=./protos ./protos/rpc.proto ./protos/types.proto
37-
//go:generate protoc --go_out=. --go-grpc_out=. --proto_path=./protos ./protos/cloud.proto
37+
//go:generate protoc --go_out=. --go-grpc_out=. --proto_path=./protos --go_opt=module=github.com/amir20/dozzle --go-grpc_opt=module=github.com/amir20/dozzle ./protos/cloud.proto
3838
func main() {
3939
cli.ValidateEnvVars(cli.Args{}, cli.AgentCmd{})
4040
args, subcommand := cli.ParseArgs()
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protos/cloud.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ syntax = "proto3";
22

33
package cloud;
44

5-
option go_package = "internal/cloud/pb";
5+
option go_package = "github.com/amir20/dozzle/proto/cloud";
66

77
service CloudToolService {
88
// Dozzle sends ToolResponse, cloud sends ToolRequest

0 commit comments

Comments
 (0)