Skip to content

Commit

Permalink
SIG: Move pathmgr to a library (#3667)
Browse files Browse the repository at this point in the history
  • Loading branch information
sustrik authored Feb 17, 2020
1 parent 0e4d61f commit 1ab6949
Show file tree
Hide file tree
Showing 19 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ go_library(
"syncpaths.go",
"watch.go",
],
importpath = "github.com/scionproto/scion/go/sig/internal/pathmgr",
visibility = ["//go/sig:__subpackages__"],
importpath = "github.com/scionproto/scion/go/lib/pathmgr",
visibility = ["//visibility:public"],
deps = [
"//go/lib/addr:go_default_library",
"//go/lib/common:go_default_library",
Expand Down Expand Up @@ -38,14 +38,14 @@ go_test(
"//go/lib/ctrl/path_mgmt:go_default_library",
"//go/lib/infra:go_default_library",
"//go/lib/log:go_default_library",
"//go/lib/pathmgr/mock_pathmgr:go_default_library",
"//go/lib/pathpol:go_default_library",
"//go/lib/sciond:go_default_library",
"//go/lib/sciond/mock_sciond:go_default_library",
"//go/lib/snet:go_default_library",
"//go/lib/snet/mock_snet:go_default_library",
"//go/lib/spath/spathmeta:go_default_library",
"//go/lib/xtest:go_default_library",
"//go/sig/internal/pathmgr/mock_pathmgr:go_default_library",
"@com_github_golang_mock//gomock:go_default_library",
"@com_github_smartystreets_goconvey//convey:go_default_library",
"@com_github_stretchr_testify//assert:go_default_library",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["pathmgr.go"],
importpath = "github.com/scionproto/scion/go/sig/internal/pathmgr/mock_pathmgr",
importpath = "github.com/scionproto/scion/go/lib/pathmgr/mock_pathmgr",
visibility = ["//visibility:public"],
deps = [
"//go/lib/addr:go_default_library",
"//go/lib/common:go_default_library",
"//go/lib/ctrl/path_mgmt:go_default_library",
"//go/lib/pathmgr:go_default_library",
"//go/lib/pathpol:go_default_library",
"//go/lib/sciond:go_default_library",
"//go/lib/spath/spathmeta:go_default_library",
"//go/sig/internal/pathmgr:go_default_library",
"@com_github_golang_mock//gomock:go_default_library",
],
)

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

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ import (
"github.com/scionproto/scion/go/lib/common"
"github.com/scionproto/scion/go/lib/ctrl/path_mgmt"
"github.com/scionproto/scion/go/lib/infra"
"github.com/scionproto/scion/go/lib/pathmgr"
"github.com/scionproto/scion/go/lib/pathmgr/mock_pathmgr"
"github.com/scionproto/scion/go/lib/pathpol"
"github.com/scionproto/scion/go/lib/sciond"
"github.com/scionproto/scion/go/lib/sciond/mock_sciond"
"github.com/scionproto/scion/go/lib/xtest"
"github.com/scionproto/scion/go/sig/internal/pathmgr"
"github.com/scionproto/scion/go/sig/internal/pathmgr/mock_pathmgr"
)

const timeUnitDuration time.Duration = 10 * time.Millisecond
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

. "github.com/smartystreets/goconvey/convey"

"github.com/scionproto/scion/go/lib/pathmgr"
"github.com/scionproto/scion/go/lib/spath/spathmeta"
"github.com/scionproto/scion/go/sig/internal/pathmgr"
)

func TestSyncPathsTimestamp(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion go/sig/egress/session/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ go_library(
"//go/lib/ctrl/sig_mgmt:go_default_library",
"//go/lib/infra:go_default_library",
"//go/lib/log:go_default_library",
"//go/lib/pathmgr:go_default_library",
"//go/lib/pktdisp:go_default_library",
"//go/lib/ringbuf:go_default_library",
"//go/lib/snet:go_default_library",
Expand All @@ -24,7 +25,6 @@ go_library(
"//go/sig/egress/worker:go_default_library",
"//go/sig/internal/disp:go_default_library",
"//go/sig/internal/metrics:go_default_library",
"//go/sig/internal/pathmgr:go_default_library",
"//go/sig/internal/sigcmn:go_default_library",
],
)
2 changes: 1 addition & 1 deletion go/sig/egress/session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ import (
"github.com/scionproto/scion/go/lib/common"
"github.com/scionproto/scion/go/lib/ctrl/sig_mgmt"
"github.com/scionproto/scion/go/lib/log"
"github.com/scionproto/scion/go/lib/pathmgr"
"github.com/scionproto/scion/go/lib/pktdisp"
"github.com/scionproto/scion/go/lib/ringbuf"
"github.com/scionproto/scion/go/lib/snet"
"github.com/scionproto/scion/go/lib/spath/spathmeta"
"github.com/scionproto/scion/go/sig/egress/iface"
"github.com/scionproto/scion/go/sig/egress/worker"
"github.com/scionproto/scion/go/sig/internal/pathmgr"
"github.com/scionproto/scion/go/sig/internal/sigcmn"
)

Expand Down
2 changes: 1 addition & 1 deletion go/sig/internal/sigcmn/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ go_library(
"//go/lib/ctrl/sig_mgmt:go_default_library",
"//go/lib/env:go_default_library",
"//go/lib/log:go_default_library",
"//go/lib/pathmgr:go_default_library",
"//go/lib/sciond/fake:go_default_library",
"//go/lib/serrors:go_default_library",
"//go/lib/snet:go_default_library",
"//go/lib/sock/reliable:go_default_library",
"//go/sig/internal/pathmgr:go_default_library",
"//go/sig/internal/sigconfig:go_default_library",
"//go/sig/internal/snetmigrate:go_default_library",
],
Expand Down
2 changes: 1 addition & 1 deletion go/sig/internal/sigcmn/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ import (
"github.com/scionproto/scion/go/lib/ctrl/sig_mgmt"
"github.com/scionproto/scion/go/lib/env"
"github.com/scionproto/scion/go/lib/log"
"github.com/scionproto/scion/go/lib/pathmgr"
"github.com/scionproto/scion/go/lib/sciond/fake"
"github.com/scionproto/scion/go/lib/serrors"
"github.com/scionproto/scion/go/lib/snet"
"github.com/scionproto/scion/go/lib/sock/reliable"
"github.com/scionproto/scion/go/sig/internal/pathmgr"
"github.com/scionproto/scion/go/sig/internal/sigconfig"
"github.com/scionproto/scion/go/sig/internal/snetmigrate"
)
Expand Down
2 changes: 1 addition & 1 deletion go/sig/internal/snetmigrate/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ go_library(
deps = [
"//go/lib/addr:go_default_library",
"//go/lib/common:go_default_library",
"//go/lib/pathmgr:go_default_library",
"//go/lib/pathpol:go_default_library",
"//go/lib/sciond:go_default_library",
"//go/lib/serrors:go_default_library",
"//go/lib/snet:go_default_library",
"//go/lib/spath:go_default_library",
"//go/lib/spath/spathmeta:go_default_library",
"//go/sig/internal/pathmgr:go_default_library",
],
)
2 changes: 1 addition & 1 deletion go/sig/internal/snetmigrate/querier.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (

"github.com/scionproto/scion/go/lib/addr"
"github.com/scionproto/scion/go/lib/common"
"github.com/scionproto/scion/go/lib/pathmgr"
"github.com/scionproto/scion/go/lib/pathpol"
"github.com/scionproto/scion/go/lib/sciond"
"github.com/scionproto/scion/go/lib/snet"
"github.com/scionproto/scion/go/lib/spath/spathmeta"
"github.com/scionproto/scion/go/sig/internal/pathmgr"
)

// PathQuerier implements snet.PathQuerier. This struct just exists to simplify
Expand Down
2 changes: 1 addition & 1 deletion go/sig/internal/snetmigrate/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ package snetmigrate
import (
"context"

"github.com/scionproto/scion/go/lib/pathmgr"
"github.com/scionproto/scion/go/lib/sciond"
"github.com/scionproto/scion/go/lib/serrors"
"github.com/scionproto/scion/go/sig/internal/pathmgr"
)

func ResolverFromSD(sciondPath string, pathCount uint16) (pathmgr.Resolver, error) {
Expand Down
2 changes: 1 addition & 1 deletion tools/gomocks
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ MOCK_TARGETS = [
(SCION_PACKAGE_PREFIX + "/go/lib/log", "Handler,Logger"),
(SCION_PACKAGE_PREFIX + "/go/lib/overlay/conn", "Conn"),
(SCION_PACKAGE_PREFIX + "/go/lib/pathdb", "PathDB,Transaction,ReadWrite"),
(SCION_PACKAGE_PREFIX + "/go/lib/pathmgr", "Policy,Querier,Resolver"),
(SCION_PACKAGE_PREFIX + "/go/lib/revcache", "RevCache"),
(SCION_PACKAGE_PREFIX + "/go/lib/sciond", "Service,Connector"),
(SCION_PACKAGE_PREFIX + "/go/lib/snet", "Conn,PacketDispatcherService,Network,PacketConn," +
Expand All @@ -67,7 +68,6 @@ MOCK_TARGETS = [
(SCION_PACKAGE_PREFIX + "/go/lib/periodic/internal/metrics", "ExportMetric"),
(SCION_PACKAGE_PREFIX + "/go/lib/xtest", "Callback"),
(SCION_PACKAGE_PREFIX + "/go/sciond/internal/fetcher", "Policy"),
(SCION_PACKAGE_PREFIX + "/go/sig/internal/pathmgr", "Policy,Querier,Resolver"),
(SCION_PACKAGE_PREFIX + "/go/sig/egress/iface", "Session"),
(SCION_PACKAGE_PREFIX + "/go/sig/egress/worker", "SCIONWriter"),
]
Expand Down

0 comments on commit 1ab6949

Please sign in to comment.