Skip to content

Commit 7d4ffb7

Browse files
author
Daniel Beres
committed
refactor: move proto definitions from internal/agent/proto to pkg/agent/proto
Move the proto package to pkg/ to make it accessible by external consumers without depending on internal packages. Update all import paths accordingly. Signed-off-by: Daniel Beres <daniel.beres@sap.com>
1 parent 839db39 commit 7d4ffb7

8 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ GOBIN=$(shell go env GOBIN)
1313
endif
1414

1515

16-
PROTO_DIR=./internal/agent/proto
16+
PROTO_DIR=./pkg/agent/proto
1717

1818
# CONTAINER_TOOL defines the container tool to be used for building images.
1919
# Be aware that the target commands are only tested with Docker which is

‎REUSE.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ SPDX-PackageDownloadLocation = "https://github.com/ironcore-dev/sonic-operator"
2626
"README.md",
2727
"internal/agent/hack/**",
2828
"internal/agent/proto/**",
29+
"pkg/agent/proto/**",
2930
"test/emulation/**",
3031
]
3132
precedence = "aggregate"

‎internal/agent/agent_client/client/client.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
"google.golang.org/grpc"
1212
"google.golang.org/grpc/credentials/insecure"
1313

14-
pb "github.com/ironcore-dev/sonic-operator/internal/agent/proto"
1514
agent "github.com/ironcore-dev/sonic-operator/internal/agent/types"
15+
pb "github.com/ironcore-dev/sonic-operator/pkg/agent/proto"
1616
)
1717

1818
type SwitchAgentClient interface {

‎internal/agent/agent_server/server.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
"log"
1111
"net"
1212

13-
pb "github.com/ironcore-dev/sonic-operator/internal/agent/proto"
1413
agent "github.com/ironcore-dev/sonic-operator/internal/agent/types"
14+
pb "github.com/ironcore-dev/sonic-operator/pkg/agent/proto"
1515

1616
switchAgent "github.com/ironcore-dev/sonic-operator/internal/agent/interface"
1717
"github.com/ironcore-dev/sonic-operator/internal/agent/sonic"

‎internal/agent/types/conversion_utils.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"fmt"
88
"strings"
99

10-
pb "github.com/ironcore-dev/sonic-operator/internal/agent/proto"
10+
pb "github.com/ironcore-dev/sonic-operator/pkg/agent/proto"
1111

1212
api "github.com/ironcore-dev/sonic-operator/api/v1alpha1"
1313
)
File renamed without changes.

0 commit comments

Comments
 (0)