load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "cushion", srcs = [ "buffer_messages.go", "config.go", "daemon.go", "message.go", "metrics.go", "options.go", "replication.go", "request.go", "resource_migration.go", "server.go", "storage.go", ], importpath = "edge-infra.dev/pkg/edge/datasync/cushion", visibility = ["//visibility:public"], deps = [ "//pkg/edge/apis/meta", "//pkg/edge/chariot", "//pkg/edge/clientutils", "//pkg/edge/datasync/apis/v1alpha1", "//pkg/edge/datasync/couchdb", "//pkg/k8s/runtime/conditions", "@com_github_gin_gonic_gin//:gin", "@com_github_go_kivik_kivik_v4//:kivik", "@com_github_go_kivik_kivik_v4//couchdb", "@com_github_go_logr_logr//:logr", "@com_github_peterbourgon_ff_v3//:ff", "@com_github_prometheus_client_golang//prometheus", "@com_github_prometheus_client_golang//prometheus/promhttp", "@io_k8s_apimachinery//pkg/api/errors", "@io_k8s_apimachinery//pkg/apis/meta/v1:meta", "@io_k8s_apimachinery//pkg/fields", "@io_k8s_apimachinery//pkg/labels", "@io_k8s_apimachinery//pkg/selection", "@io_k8s_apimachinery//pkg/types", "@io_k8s_apimachinery//pkg/util/runtime", "@io_k8s_apimachinery//pkg/watch", "@io_k8s_client_go//kubernetes/scheme", "@io_k8s_client_go//rest", "@io_k8s_client_go//tools/clientcmd", "@io_k8s_client_go//util/homedir", "@io_k8s_sigs_controller_runtime//pkg/client", "@org_golang_x_sys//unix", ], ) go_test( name = "cushion_test", srcs = [ "buffer_messages_test.go", "replication_test.go", "resource_migration_test.go", "storage_test.go", ], embed = [":cushion"], deps = [ "//pkg/edge/chariot", "//pkg/edge/datasync/apis/v1alpha1", "//pkg/edge/datasync/couchdb", "@com_github_go_kivik_kivik_v4//:kivik", "@com_github_go_kivik_kivik_v4//int/errors", "@com_github_stretchr_testify//assert", "@com_github_stretchr_testify//require", "@com_google_cloud_go_pubsub//:pubsub", "@io_k8s_api//core/v1:core", "@io_k8s_apimachinery//pkg/apis/meta/v1:meta", "@io_k8s_apimachinery//pkg/runtime", "@io_k8s_apimachinery//pkg/types", "@io_k8s_apimachinery//pkg/util/runtime", "@io_k8s_sigs_controller_runtime//pkg/client", "@io_k8s_sigs_controller_runtime//pkg/client/fake", ], )