Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions include/nighthawk/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,6 @@ envoy_basic_cc_library(
],
)

envoy_basic_cc_library(
name = "nighthawk_sink_client",
hdrs = [
"nighthawk_sink_client.h",
],
include_prefix = "nighthawk/common",
deps = [
"//api/sink:sink_cc_proto",
"//api/sink:sink_grpc_lib",
"@envoy//include/envoy/common:base_includes",
"@envoy//source/common/common:assert_lib_with_external_headers",
"@envoy//source/common/common:statusor_lib_with_external_headers",
"@envoy//source/common/protobuf:protobuf_with_external_headers",
],
)

envoy_basic_cc_library(
name = "request_lib",
hdrs = [
Expand Down Expand Up @@ -104,15 +88,3 @@ envoy_basic_cc_library(
"@envoy//include/envoy/common:time_interface",
],
)

envoy_basic_cc_library(
name = "sink_lib",
hdrs = [
"sink.h",
],
include_prefix = "nighthawk/common",
deps = [
"//api/client:grpc_service_lib",
"@envoy//source/common/common:statusor_lib_with_external_headers",
],
)
37 changes: 37 additions & 0 deletions include/nighthawk/sink/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
load(
"@envoy//bazel:envoy_build_system.bzl",
"envoy_basic_cc_library",
"envoy_package",
)

licenses(["notice"]) # Apache 2

envoy_package()

envoy_basic_cc_library(
name = "nighthawk_sink_client",
hdrs = [
"nighthawk_sink_client.h",
],
include_prefix = "nighthawk/sink",
deps = [
"//api/sink:sink_cc_proto",
"//api/sink:sink_grpc_lib",
"@envoy//include/envoy/common:base_includes",
"@envoy//source/common/common:assert_lib_with_external_headers",
"@envoy//source/common/common:statusor_lib_with_external_headers",
"@envoy//source/common/protobuf:protobuf_with_external_headers",
],
)

envoy_basic_cc_library(
name = "sink_lib",
hdrs = [
"sink.h",
],
include_prefix = "nighthawk/sink",
deps = [
"//api/client:grpc_service_lib",
"@envoy//source/common/common:statusor_lib_with_external_headers",
],
)
File renamed without changes.
37 changes: 0 additions & 37 deletions source/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,6 @@ envoy_cc_library(
],
)

envoy_cc_library(
name = "nighthawk_sink_client_impl",
srcs = [
"nighthawk_sink_client_impl.cc",
],
hdrs = [
"nighthawk_sink_client_impl.h",
],
repository = "@envoy",
visibility = ["//visibility:public"],
deps = [
"//api/client:base_cc_proto",
"//api/client:grpc_service_lib",
"//include/nighthawk/common:nighthawk_sink_client",
"@envoy//source/common/common:assert_lib_with_external_headers",
"@envoy//source/common/common:statusor_lib_with_external_headers",
"@envoy//source/common/protobuf:protobuf_with_external_headers",
],
)

envoy_cc_library(
name = "request_impl_lib",
hdrs = [
Expand Down Expand Up @@ -183,20 +163,3 @@ envoy_cc_library(
"@envoy//source/server/config_validation:server_lib_with_external_headers",
],
)

envoy_cc_library(
name = "sink_impl_lib",
srcs = [
"sink_impl.cc",
],
hdrs = [
"sink_impl.h",
],
repository = "@envoy",
visibility = ["//visibility:public"],
deps = [
"//include/nighthawk/common:sink_lib",
"@envoy//source/common/common:minimal_logger_lib_with_external_headers",
"@envoy//source/common/common:random_generator_lib_with_external_headers",
],
)
44 changes: 44 additions & 0 deletions source/sink/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
load(
"@envoy//bazel:envoy_build_system.bzl",
"envoy_cc_library",
"envoy_package",
)

licenses(["notice"]) # Apache 2

envoy_package()

envoy_cc_library(
name = "nighthawk_sink_client_impl",
srcs = [
"nighthawk_sink_client_impl.cc",
],
hdrs = [
"nighthawk_sink_client_impl.h",
],
repository = "@envoy",
visibility = ["//visibility:public"],
deps = [
"//include/nighthawk/sink:nighthawk_sink_client",
"@envoy//source/common/common:assert_lib_with_external_headers",
"@envoy//source/common/common:statusor_lib_with_external_headers",
"@envoy//source/common/protobuf:protobuf_with_external_headers",
],
)

envoy_cc_library(
name = "sink_impl_lib",
srcs = [
"sink_impl.cc",
],
hdrs = [
"sink_impl.h",
],
repository = "@envoy",
visibility = ["//visibility:public"],
deps = [
"//include/nighthawk/sink:sink_lib",
"@envoy//source/common/common:minimal_logger_lib_with_external_headers",
"@envoy//source/common/common:random_generator_lib_with_external_headers",
],
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "common/nighthawk_sink_client_impl.h"
#include "sink/nighthawk_sink_client_impl.h"

#include "external/envoy/source/common/common/assert.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include "nighthawk/common/nighthawk_sink_client.h"
#pragma once

#include "nighthawk/sink/nighthawk_sink_client.h"

#include "external/envoy/source/common/common/statusor.h"
#include "external/envoy/source/common/protobuf/protobuf.h"
Expand Down
2 changes: 1 addition & 1 deletion source/common/sink_impl.cc → source/sink/sink_impl.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "common/sink_impl.h"
#include "sink/sink_impl.h"

#include <array>
#include <filesystem>
Expand Down
2 changes: 1 addition & 1 deletion source/common/sink_impl.h → source/sink/sink_impl.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "nighthawk/common/sink.h"
#include "nighthawk/sink/sink.h"

namespace Nighthawk {

Expand Down
21 changes: 0 additions & 21 deletions test/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,6 @@ envoy_cc_test(
],
)

envoy_cc_test(
name = "nighthawk_sink_client_test",
srcs = ["nighthawk_sink_client_test.cc"],
repository = "@envoy",
deps = [
"//source/common:nighthawk_sink_client_impl",
"@com_github_grpc_grpc//:grpc++_test",
],
)

envoy_cc_test(
name = "sink_test",
srcs = ["sink_test.cc"],
repository = "@envoy",
deps = [
"//source/common:sink_impl_lib",
"@com_github_grpc_grpc//:grpc++_test", # Avoids undefined symbol _ZN4grpc24g_core_codegen_interfaceE in coverage test build.
"@envoy//source/common/common:random_generator_lib_with_external_headers",
],
)

envoy_cc_test(
name = "signal_handler_test",
srcs = ["signal_handler_test.cc"],
Expand Down
10 changes: 0 additions & 10 deletions test/mocks/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,3 @@ envoy_cc_mock(
"//include/nighthawk/common:base_includes",
],
)

envoy_cc_mock(
name = "mock_sink",
srcs = ["mock_sink.cc"],
hdrs = ["mock_sink.h"],
repository = "@envoy",
deps = [
"//include/nighthawk/common:sink_lib",
],
)
19 changes: 19 additions & 0 deletions test/mocks/sink/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
load(
"@envoy//bazel:envoy_build_system.bzl",
"envoy_cc_mock",
"envoy_package",
)

licenses(["notice"]) # Apache 2

envoy_package()

envoy_cc_mock(
name = "mock_sink",
srcs = ["mock_sink.cc"],
hdrs = ["mock_sink.h"],
repository = "@envoy",
deps = [
"//include/nighthawk/sink:sink_lib",
],
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "test/mocks/common/mock_sink.h"
#include "test/mocks/sink/mock_sink.h"

namespace Nighthawk {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "nighthawk/common/sink.h"
#include "nighthawk/sink/sink.h"

#include "gmock/gmock.h"

Expand Down
30 changes: 30 additions & 0 deletions test/sink/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
load(
"@envoy//bazel:envoy_build_system.bzl",
"envoy_cc_test",
"envoy_package",
)

licenses(["notice"]) # Apache 2

envoy_package()

envoy_cc_test(
name = "sink_test",
srcs = ["sink_test.cc"],
repository = "@envoy",
deps = [
"//source/sink:sink_impl_lib",
"@com_github_grpc_grpc//:grpc++_test", # Avoids undefined symbol _ZN4grpc24g_core_codegen_interfaceE in coverage test build.
"@envoy//source/common/common:random_generator_lib_with_external_headers",
],
)

envoy_cc_test(
name = "nighthawk_sink_client_test",
srcs = ["nighthawk_sink_client_test.cc"],
repository = "@envoy",
deps = [
"//source/sink:nighthawk_sink_client_impl",
"@com_github_grpc_grpc//:grpc++_test",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "api/sink/sink.grpc.pb.h"
#include "api/sink/sink_mock.grpc.pb.h"

#include "common/nighthawk_sink_client_impl.h"
#include "sink/nighthawk_sink_client_impl.h"

#include "grpcpp/test/mock_stream.h"

Expand Down
2 changes: 1 addition & 1 deletion test/common/sink_test.cc → test/sink/sink_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "external/envoy/source/common/common/random_generator.h"

#include "common/sink_impl.h"
#include "sink/sink_impl.h"

#include "gtest/gtest.h"

Expand Down
2 changes: 1 addition & 1 deletion tools/check_format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ TO_CHECK="${2:-$PWD}"
bazel run @envoy//tools:code_format/check_format.py -- \
--skip_envoy_build_rule_check --namespace_check Nighthawk \
--build_fixer_check_excluded_paths=$(realpath ".") \
--include_dir_order envoy,nighthawk,external/source/envoy,external,api,common,source,exe,server,client,grpcpp,request_source,test_common,test \
--include_dir_order envoy,nighthawk,external/source/envoy,external,api,common,source,exe,server,client,sink,grpcpp,request_source,test_common,test \
$1 $TO_CHECK

# The include checker doesn't support per-file checking, so we only
Expand Down