Skip to content

Commit

Permalink
hackathon: add server side plumbing
Browse files Browse the repository at this point in the history
  • Loading branch information
matzf committed Nov 4, 2023
1 parent f0d7985 commit 5722514
Show file tree
Hide file tree
Showing 29 changed files with 351 additions and 28 deletions.
12 changes: 12 additions & 0 deletions bufgen/proto/control_plane/experimental/v1/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//tools/lint:go.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["seg_detached_extensions.pb.go"],
importpath = "github.com/scionproto/scion/bufgen/proto/control_plane/experimental/v1",
visibility = ["//visibility:public"],
deps = [
"@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
],
)
23 changes: 23 additions & 0 deletions bufgen/proto/control_plane/v1/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
load("//tools/lint:go.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = [
"cppki.pb.go",
"drkey.pb.go",
"renewal.pb.go",
"seg.pb.go",
"seg_extensions.pb.go",
"svc_resolution.pb.go",
],
importpath = "github.com/scionproto/scion/bufgen/proto/control_plane/v1",
visibility = ["//visibility:public"],
deps = [
"//pkg/proto/control_plane/experimental:go_default_library",
"//pkg/proto/crypto:go_default_library",
"//pkg/proto/drkey:go_default_library",
"@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
"@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
],
)
17 changes: 17 additions & 0 deletions bufgen/proto/control_plane/v1/control_planeconnect/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
load("//tools/lint:go.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = [
"cppki.connect.go",
"drkey.connect.go",
"renewal.connect.go",
"seg.connect.go",
],
importpath = "github.com/scionproto/scion/bufgen/proto/control_plane/v1/control_planeconnect",
visibility = ["//visibility:public"],
deps = [
"//pkg/proto/control_plane:go_default_library",
"@com_connectrpc_connect//:go_default_library",
],
)
13 changes: 13 additions & 0 deletions bufgen/proto/crypto/v1/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
load("//tools/lint:go.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["signed.pb.go"],
importpath = "github.com/scionproto/scion/bufgen/proto/crypto/v1",
visibility = ["//visibility:public"],
deps = [
"@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
"@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
],
)
15 changes: 15 additions & 0 deletions bufgen/proto/daemon/v1/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
load("//tools/lint:go.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["daemon.pb.go"],
importpath = "github.com/scionproto/scion/bufgen/proto/daemon/v1",
visibility = ["//visibility:public"],
deps = [
"//pkg/proto/drkey:go_default_library",
"@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
"@org_golang_google_protobuf//types/known/durationpb:go_default_library",
"@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
],
)
12 changes: 12 additions & 0 deletions bufgen/proto/daemon/v1/daemonconnect/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//tools/lint:go.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["daemon.connect.go"],
importpath = "github.com/scionproto/scion/bufgen/proto/daemon/v1/daemonconnect",
visibility = ["//visibility:public"],
deps = [
"//pkg/proto/daemon:go_default_library",
"@com_connectrpc_connect//:go_default_library",
],
)
12 changes: 12 additions & 0 deletions bufgen/proto/discovery/v1/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//tools/lint:go.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["discovery.pb.go"],
importpath = "github.com/scionproto/scion/bufgen/proto/discovery/v1",
visibility = ["//visibility:public"],
deps = [
"@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
],
)
12 changes: 12 additions & 0 deletions bufgen/proto/discovery/v1/discoveryconnect/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//tools/lint:go.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["discovery.connect.go"],
importpath = "github.com/scionproto/scion/bufgen/proto/discovery/v1/discoveryconnect",
visibility = ["//visibility:public"],
deps = [
"//pkg/proto/discovery:go_default_library",
"@com_connectrpc_connect//:go_default_library",
],
)
12 changes: 12 additions & 0 deletions bufgen/proto/drkey/v1/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//tools/lint:go.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["drkey.pb.go"],
importpath = "github.com/scionproto/scion/bufgen/proto/drkey/v1",
visibility = ["//visibility:public"],
deps = [
"@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
],
)
15 changes: 15 additions & 0 deletions bufgen/proto/gateway/v1/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
load("//tools/lint:go.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = [
"control.pb.go",
"prefix.pb.go",
],
importpath = "github.com/scionproto/scion/bufgen/proto/gateway/v1",
visibility = ["//visibility:public"],
deps = [
"@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
],
)
12 changes: 12 additions & 0 deletions bufgen/proto/gateway/v1/gatewayconnect/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//tools/lint:go.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["prefix.connect.go"],
importpath = "github.com/scionproto/scion/bufgen/proto/gateway/v1/gatewayconnect",
visibility = ["//visibility:public"],
deps = [
"//pkg/proto/gateway:go_default_library",
"@com_connectrpc_connect//:go_default_library",
],
)
14 changes: 14 additions & 0 deletions bufgen/proto/hidden_segment/v1/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
load("//tools/lint:go.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["hidden_segment.pb.go"],
importpath = "github.com/scionproto/scion/bufgen/proto/hidden_segment/v1",
visibility = ["//visibility:public"],
deps = [
"//pkg/proto/control_plane:go_default_library",
"//pkg/proto/crypto:go_default_library",
"@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
"@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
],
)
12 changes: 12 additions & 0 deletions bufgen/proto/hidden_segment/v1/hidden_segmentconnect/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("//tools/lint:go.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["hidden_segment.connect.go"],
importpath = "github.com/scionproto/scion/bufgen/proto/hidden_segment/v1/hidden_segmentconnect",
visibility = ["//visibility:public"],
deps = [
"//pkg/proto/hidden_segment:go_default_library",
"@com_connectrpc_connect//:go_default_library",
],
)
13 changes: 13 additions & 0 deletions control/beaconing/connect/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
load("//tools/lint:go.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["server.go"],
importpath = "github.com/scionproto/scion/control/beaconing/connect",
visibility = ["//visibility:public"],
deps = [
"//control/beaconing/grpc:go_default_library",
"//pkg/proto/control_plane:go_default_library",
"@com_connectrpc_connect//:go_default_library",
],
)
2 changes: 1 addition & 1 deletion control/beaconing/connect/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

type SegmentCreationServer struct {
grpc.SegmentCreationServer
*grpc.SegmentCreationServer
}

func (s SegmentCreationServer) Beacon(ctx context.Context, req *connect.Request[control_plane.BeaconRequest]) (*connect.Response[control_plane.BeaconResponse], error) {
Expand Down
8 changes: 8 additions & 0 deletions control/cmd/control/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,22 @@ go_library(
importpath = "github.com/scionproto/scion/control/cmd/control",
visibility = ["//visibility:private"],
deps = [
"//bufgen/proto/control_plane/v1/control_planeconnect:go_default_library",
"//control:go_default_library",
"//control/beacon:go_default_library",
"//control/beaconing:go_default_library",
"//control/beaconing/connect:go_default_library",
"//control/beaconing/grpc:go_default_library",
"//control/config:go_default_library",
"//control/drkey:go_default_library",
"//control/drkey/grpc:go_default_library",
"//control/ifstate:go_default_library",
"//control/mgmtapi:go_default_library",
"//control/onehop:go_default_library",
"//control/segreg/connect:go_default_library",
"//control/segreg/grpc:go_default_library",
"//control/segreq:go_default_library",
"//control/segreq/connect:go_default_library",
"//control/segreq/grpc:go_default_library",
"//control/trust:go_default_library",
"//control/trust/grpc:go_default_library",
Expand All @@ -38,13 +42,15 @@ go_library(
"//pkg/scrypto:go_default_library",
"//pkg/scrypto/cppki:go_default_library",
"//pkg/snet:go_default_library",
"//pkg/snet/squic:go_default_library",
"//private/app:go_default_library",
"//private/app/appnet:go_default_library",
"//private/app/command:go_default_library",
"//private/app/launcher:go_default_library",
"//private/ca/api:go_default_library",
"//private/ca/config:go_default_library",
"//private/ca/renewal:go_default_library",
"//private/ca/renewal/connect:go_default_library",
"//private/ca/renewal/grpc:go_default_library",
"//private/discovery:go_default_library",
"//private/drkey/drkeyutil:go_default_library",
Expand All @@ -71,6 +77,8 @@ go_library(
"@com_github_go_chi_chi_v5//:go_default_library",
"@com_github_go_chi_cors//:go_default_library",
"@com_github_grpc_ecosystem_go_grpc_prometheus//:go_default_library",
"@com_github_quic_go_quic_go//:go_default_library",
"@com_github_quic_go_quic_go//http3:go_default_library",
"@com_github_spf13_cobra//:go_default_library",
"@in_gopkg_yaml_v2//:go_default_library",
"@org_go4_netipx//:go_default_library",
Expand Down
Loading

0 comments on commit 5722514

Please sign in to comment.