From 90c12e864561f972bd325eb8d3b99a3aa8b53196 Mon Sep 17 00:00:00 2001 From: kpango Date: Mon, 11 Nov 2024 16:43:43 +0900 Subject: [PATCH] Add QUIC support Signed-off-by: kpango --- .gitfiles | 2 + apis/grpc/v1/payload/interface.go | 4 +- .../vald-helm-operator/crds/valdrelease.yaml | 120 ++++++++++ charts/vald/README.md | 26 ++- charts/vald/templates/agent/pdb.yaml | 1 + charts/vald/templates/discoverer/pdb.yaml | 1 + charts/vald/templates/gateway/filter/pdb.yaml | 1 + charts/vald/templates/gateway/lb/pdb.yaml | 1 + charts/vald/templates/gateway/mirror/pdb.yaml | 1 + charts/vald/templates/manager/index/pdb.yaml | 1 + charts/vald/values.go | 4 +- charts/vald/values.schema.json | 220 +++++++++++++----- charts/vald/values.yaml | 51 +++- cmd/agent/core/faiss/main_test.go | 4 +- cmd/gateway/mirror/main.go | 4 +- cmd/gateway/mirror/main_test.go | 4 +- cmd/index/job/correction/main.go | 4 +- cmd/index/job/correction/main_test.go | 4 +- cmd/index/job/creation/main.go | 4 +- cmd/index/job/creation/main_test.go | 4 +- cmd/index/job/deletion/main.go | 4 +- cmd/index/job/readreplica/rotate/main.go | 4 +- cmd/index/job/readreplica/rotate/main_test.go | 4 +- cmd/index/job/save/main.go | 4 +- cmd/index/job/save/main_test.go | 4 +- cmd/index/operator/main.go | 4 +- cmd/index/operator/main_test.go | 4 +- cmd/tools/benchmark/job/main_test.go | 4 +- cmd/tools/benchmark/operator/main_test.go | 4 +- cmd/tools/cli/benchmark/core/main_test.go | 4 +- cmd/tools/cli/loadtest/main.go | 4 +- cmd/tools/cli/loadtest/main_test.go | 4 +- example/client/agent/main.go | 4 +- example/client/go.mod | 2 +- example/client/go.mod.default | 2 +- example/client/main.go | 4 +- example/client/mirror/main.go | 4 +- go.mod | 8 +- go.sum | 9 +- hack/actions/gen/main_test.go | 4 +- hack/benchmark/assets/x1b/loader.go | 4 +- .../benchmark/assets/x1b/loader_bench_test.go | 4 +- hack/benchmark/assets/x1b/loader_test.go | 4 +- .../e2e/agent/core/ngt/ngt_bench_test.go | 4 +- hack/benchmark/internal/assets/dataset.go | 4 +- .../benchmark/internal/assets/dataset_test.go | 4 +- hack/benchmark/internal/operation/insert.go | 4 +- .../internal/operation/insert_test.go | 4 +- .../benchmark/internal/operation/operation.go | 4 +- .../internal/operation/operation_test.go | 4 +- hack/benchmark/internal/operation/option.go | 4 +- .../internal/operation/option_test.go | 4 +- hack/benchmark/internal/operation/remove.go | 4 +- .../internal/operation/remove_test.go | 4 +- hack/benchmark/internal/operation/search.go | 4 +- .../internal/operation/search_test.go | 4 +- hack/benchmark/internal/operation/util.go | 4 +- .../benchmark/internal/operation/util_test.go | 4 +- hack/benchmark/metrics/metrics.go | 4 +- .../singleflight/singleflight_bench_test.go | 4 +- hack/cspell/main.go | 4 +- hack/cspell/main_test.go | 4 +- hack/go.mod.default | 2 +- hack/gorules/rules.go | 4 +- hack/gorules/rules_test.go | 4 +- hack/gorules/testdata/tests.go | 4 +- hack/tools/deadlink/main.go | 4 +- hack/tools/metrics/main.go | 4 +- hack/tools/metrics/main_test.go | 4 +- internal/backoff/context.go | 4 +- internal/backoff/context_test.go | 4 +- internal/backoff/option_test.go | 4 +- internal/circuitbreaker/breaker.go | 4 +- internal/circuitbreaker/breaker_test.go | 4 +- internal/circuitbreaker/counter.go | 4 +- internal/circuitbreaker/counter_test.go | 4 +- internal/circuitbreaker/manager.go | 4 +- internal/circuitbreaker/manager_test.go | 4 +- internal/circuitbreaker/options.go | 4 +- internal/circuitbreaker/options_test.go | 4 +- internal/circuitbreaker/state.go | 4 +- internal/circuitbreaker/state_test.go | 4 +- internal/circuitbreaker/tripper.go | 4 +- internal/circuitbreaker/tripper_test.go | 4 +- .../client/v1/client/discoverer/discover.go | 134 ++++++----- internal/client/v1/client/mirror/mirror.go | 4 +- .../client/v1/client/mirror/mirror_test.go | 4 +- internal/client/v1/client/mirror/option.go | 4 +- .../client/v1/client/mirror/option_test.go | 4 +- internal/compress/gob/gob.go | 4 +- internal/compress/gob/gob_mock.go | 4 +- internal/compress/gzip/gzip.go | 4 +- internal/compress/gzip/gzip_mock.go | 4 +- internal/compress/lz4/lz4.go | 4 +- internal/compress/lz4/lz4_mock.go | 4 +- internal/compress/mock.go | 4 +- internal/compress/mock_test.go | 4 +- internal/compress/zstd/option.go | 4 +- internal/compress/zstd/zstd.go | 4 +- internal/compress/zstd/zstd_mock.go | 4 +- internal/config/benchmark_test.go | 4 +- internal/config/circuitbreaker.go | 4 +- internal/config/circuitbreaker_test.go | 4 +- internal/config/corrector_test.go | 4 +- internal/config/faiss_test.go | 4 +- internal/config/grpc.go | 6 +- internal/config/index_creation.go | 4 +- internal/config/index_creation_test.go | 4 +- internal/config/index_deleter.go | 4 +- internal/config/index_operator.go | 4 +- internal/config/index_operator_test.go | 4 +- internal/config/index_save.go | 4 +- internal/config/index_save_test.go | 4 +- internal/config/mirror.go | 4 +- internal/config/mirror_test.go | 4 +- internal/config/net.go | 2 + internal/config/readreplica_rotate.go | 4 +- internal/config/readreplica_rotate_test.go | 4 +- internal/conv/conv.go | 4 +- internal/conv/conv_bench_test.go | 4 +- internal/conv/conv_test.go | 4 +- .../core/algorithm/usearch/option_test.go | 4 +- internal/db/kvs/bbolt/bbolt.go | 4 +- internal/db/kvs/bbolt/bbolt_test.go | 4 +- internal/db/kvs/bbolt/option.go | 4 +- internal/db/kvs/bbolt/option_test.go | 4 +- internal/db/kvs/pogreb/options.go | 4 +- internal/db/kvs/pogreb/options_test.go | 4 +- internal/db/kvs/pogreb/pogreb.go | 4 +- internal/db/kvs/pogreb/pogreb_test.go | 4 +- internal/db/kvs/redis/redis_mock.go | 4 +- internal/db/nosql/cassandra/cassandra_mock.go | 4 +- .../storage/blob/cloudstorage/cloudstorage.go | 4 +- .../blob/cloudstorage/cloudstorage_test.go | 4 +- .../db/storage/blob/cloudstorage/option.go | 4 +- .../storage/blob/cloudstorage/option_test.go | 4 +- .../blob/cloudstorage/urlopener/option.go | 4 +- .../cloudstorage/urlopener/option_test.go | 4 +- .../blob/cloudstorage/urlopener/urlopener.go | 4 +- .../cloudstorage/urlopener/urlopener_test.go | 4 +- internal/db/storage/blob/s3/reader/io/io.go | 4 +- .../db/storage/blob/s3/reader/io/io_test.go | 4 +- internal/db/storage/blob/s3/sdk/s3/s3.go | 4 +- .../storage/blob/s3/sdk/s3/s3iface/s3iface.go | 4 +- .../blob/s3/sdk/s3/s3manager/s3manager.go | 4 +- .../s3/sdk/s3/s3manager/s3manager_test.go | 4 +- .../db/storage/blob/s3/writer/writer_mock.go | 4 +- internal/encoding/json/json_test.go | 4 +- internal/errors/circuitbreaker.go | 4 +- internal/errors/circuitbreaker_test.go | 4 +- internal/errors/compressor_test.go | 4 +- internal/errors/discoverer_test.go | 4 +- internal/errors/errors_benchmark_test.go | 4 +- internal/errors/errors_test.go | 4 +- internal/errors/faiss_test.go | 4 +- internal/errors/file_test.go | 4 +- internal/errors/grpc_test.go | 4 +- internal/errors/http_test.go | 4 +- internal/errors/info.go | 4 +- internal/errors/io_test.go | 4 +- internal/errors/net.go | 6 + internal/errors/net_test.go | 4 +- internal/errors/observability_test.go | 4 +- internal/errors/option.go | 4 +- internal/errors/option_test.go | 4 +- internal/errors/runner_test.go | 4 +- internal/errors/unit_test.go | 4 +- internal/errors/usearch_test.go | 4 +- internal/errors/vald_test.go | 4 +- internal/info/info_bench_test.go | 4 +- internal/info/info_test.go | 4 +- internal/info/option.go | 4 +- internal/info/option_test.go | 4 +- internal/k8s/client/client_test.go | 4 +- internal/k8s/client/option_test.go | 4 +- internal/k8s/job/job.go | 4 +- internal/k8s/job/job_test.go | 4 +- internal/k8s/job/option.go | 4 +- internal/k8s/job/option_test.go | 4 +- internal/k8s/service/option_test.go | 4 +- internal/k8s/service/service_test.go | 4 +- internal/k8s/v2/pod/option_test.go | 4 +- internal/k8s/v2/pod/pod_test.go | 4 +- .../vald/benchmark/api/v1/job_types_test.go | 4 +- .../benchmark/api/v1/scenario_types_test.go | 4 +- .../benchmark/job/job_template_option_test.go | 4 +- .../vald/benchmark/job/job_template_test.go | 4 +- internal/k8s/vald/benchmark/job/job_test.go | 4 +- .../k8s/vald/benchmark/job/option_test.go | 4 +- .../vald/benchmark/scenario/option_test.go | 4 +- .../vald/benchmark/scenario/scenario_test.go | 4 +- .../k8s/vald/mirror/api/v1/target_types.go | 4 +- .../vald/mirror/api/v1/target_types_test.go | 4 +- internal/k8s/vald/mirror/target/option.go | 4 +- internal/k8s/vald/mirror/target/target.go | 4 +- .../k8s/vald/mirror/target/target_template.go | 4 +- .../mirror/target/target_template_option.go | 4 +- internal/log/format/format_test.go | 4 +- internal/log/glg/glg_test.go | 4 +- internal/log/glg/option_test.go | 4 +- internal/log/level/level_test.go | 4 +- internal/log/mock/logger.go | 4 +- internal/log/mock/logger_test.go | 4 +- internal/log/mock/retry.go | 4 +- internal/log/mock/retry_test.go | 4 +- internal/log/nop/nop.go | 4 +- internal/log/nop/nop_test.go | 4 +- internal/log/option.go | 4 +- internal/log/option_test.go | 4 +- internal/log/retry/option.go | 4 +- internal/log/retry/option_test.go | 4 +- internal/log/retry/retry.go | 4 +- internal/log/retry/retry_test.go | 4 +- internal/log/zap/option.go | 4 +- internal/log/zap/option_test.go | 4 +- internal/log/zap/zap.go | 4 +- internal/log/zap/zap_test.go | 4 +- internal/net/dialer.go | 66 ++++-- internal/net/dialer_test.go | 6 +- internal/net/grpc/codes/codes_test.go | 4 +- internal/net/grpc/context.go | 4 +- internal/net/grpc/context_test.go | 4 +- .../interceptor/client/metric/metric_test.go | 4 +- .../grpc/interceptor/client/trace/trace.go | 4 +- .../grpc/interceptor/server/metric/metric.go | 4 +- .../interceptor/server/metric/metric_test.go | 4 +- .../grpc/interceptor/server/trace/trace.go | 4 +- .../interceptor/server/trace/trace_test.go | 4 +- internal/net/grpc/logger/logger.go | 4 +- internal/net/grpc/logger/logger_test.go | 4 +- internal/net/grpc/metadata_test.go | 4 +- internal/net/grpc/option.go | 16 +- internal/net/grpc/pool/pool_test.go | 4 +- internal/net/http/dump/dump_test.go | 4 +- internal/net/http/json/json_test.go | 4 +- internal/net/http/metrics/pprof_test.go | 4 +- .../net/http/middleware/middleware_test.go | 4 +- internal/net/http/middleware/option_test.go | 4 +- internal/net/http/middleware/timeout_test.go | 4 +- internal/net/http/rest/rest_test.go | 4 +- internal/net/http/routing/middleware_mock.go | 4 +- internal/net/http/routing/option_test.go | 4 +- internal/net/http/routing/router_test.go | 4 +- internal/net/http/transport/roundtrip_mock.go | 4 +- internal/net/net.go | 31 +++ internal/net/net_test.go | 2 +- internal/net/quic/conn.go | 172 ++++++++++++++ internal/net/quic/listener.go | 84 +++++++ internal/observability/attribute/attribute.go | 4 +- .../observability/attribute/attribute_test.go | 4 +- internal/observability/exporter/exporter.go | 4 +- .../observability/exporter/otlp/option.go | 4 +- .../exporter/otlp/option_test.go | 4 +- internal/observability/exporter/otlp/otlp.go | 4 +- .../observability/exporter/otlp/otlp_test.go | 4 +- .../metrics/agent/core/faiss/faiss.go | 4 +- .../metrics/agent/core/faiss/faiss_test.go | 4 +- .../metrics/agent/core/ngt/ngt.go | 4 +- .../metrics/agent/core/ngt/ngt_test.go | 4 +- .../metrics/agent/sidecar/sidecar.go | 4 +- .../metrics/agent/sidecar/sidecar_test.go | 4 +- .../observability/metrics/backoff/backoff.go | 4 +- .../metrics/backoff/backoff_test.go | 4 +- .../metrics/circuitbreaker/circuitbreaker.go | 4 +- .../circuitbreaker/circuitbreaker_test.go | 4 +- .../metrics/gateway/mirror/mirror.go | 4 +- .../metrics/gateway/mirror/mirror_test.go | 4 +- internal/observability/metrics/grpc/grpc.go | 4 +- .../observability/metrics/grpc/grpc_test.go | 4 +- .../index/job/correction/correction.go | 4 +- .../index/job/correction/correction_test.go | 4 +- internal/observability/metrics/info/info.go | 4 +- .../observability/metrics/info/info_test.go | 4 +- .../metrics/manager/index/index.go | 4 +- .../metrics/manager/index/index_test.go | 4 +- .../observability/metrics/mem/index/index.go | 4 +- .../metrics/mem/index/index_test.go | 4 +- internal/observability/metrics/mem/mem.go | 4 +- .../observability/metrics/mem/mem_test.go | 4 +- internal/observability/metrics/metrics.go | 4 +- .../observability/metrics/metrics_test.go | 4 +- .../observability/metrics/runtime/cgo/cgo.go | 4 +- .../metrics/runtime/cgo/cgo_test.go | 4 +- .../metrics/runtime/goroutine/goroutine.go | 4 +- .../runtime/goroutine/goroutine_test.go | 4 +- .../metrics/tools/benchmark/benchmark.go | 4 +- .../metrics/tools/benchmark/benchmark_test.go | 4 +- .../observability/metrics/version/version.go | 4 +- .../metrics/version/version_test.go | 4 +- internal/observability/observability.go | 4 +- internal/observability/observability_test.go | 4 +- internal/observability/option.go | 4 +- internal/observability/option_test.go | 4 +- internal/os/hostname_test.go | 4 +- internal/rand/rand_bench_test.go | 4 +- internal/rand/rand_test.go | 4 +- internal/runner/runner_mock.go | 4 +- internal/runner/runner_race_test.go | 4 +- internal/safety/safety_bench_test.go | 4 +- internal/safety/safety_test.go | 4 +- internal/servers/option_test.go | 4 +- internal/servers/server/option_test.go | 4 +- internal/servers/server/server.go | 68 ++++-- internal/servers/server/server_test.go | 4 +- internal/servers/servers.go | 15 +- internal/servers/servers_mock.go | 4 +- internal/servers/servers_test.go | 4 +- internal/servers/starter/option_test.go | 4 +- internal/servers/starter/starter_test.go | 4 +- internal/strings/strings.go | 4 +- internal/strings/strings_benchmark_test.go | 4 +- internal/strings/strings_test.go | 4 +- internal/sync/alias.go | 4 +- internal/sync/map.go | 4 +- .../sync/semaphore/semaphore_bench_test.go | 1 + internal/test/comparator/comparators.go | 4 +- internal/test/comparator/standard.go | 4 +- internal/test/data/request/insert.go | 4 +- internal/test/data/request/insert_test.go | 4 +- internal/test/data/request/object.go | 4 +- internal/test/data/request/object_test.go | 4 +- internal/test/data/request/remove.go | 4 +- internal/test/data/request/remove_test.go | 4 +- internal/test/data/strings/strings.go | 4 +- .../data/strings/strings_benchmark_test.go | 4 +- internal/test/data/strings/strings_test.go | 4 +- internal/test/data/vector/gen.go | 4 +- internal/test/data/vector/gen_test.go | 4 +- internal/test/goleak/goleak.go | 4 +- internal/test/goleak/goleak_test.go | 4 +- .../mock/client/discoverer_client_mock.go | 4 +- .../test/mock/client/mirror_client_mock.go | 4 +- internal/test/mock/controller_runtime.go | 4 +- internal/test/mock/grpc/grpc_client_mock.go | 4 +- internal/test/mock/grpc_testify_mock.go | 4 +- internal/test/mock/k8s/client.go | 4 +- internal/test/mock/k8s/controller_runtime.go | 4 +- internal/test/mock/k8s/reconciler.go | 4 +- internal/test/mock/server_stream.go | 4 +- internal/test/testdata.go | 4 +- internal/test/testdata_test.go | 4 +- internal/test/testify/testify.go | 4 +- internal/timeutil/location/loc.go | 4 +- internal/timeutil/location/loc_bench_test.go | 4 +- internal/timeutil/location/loc_test.go | 4 +- internal/timeutil/location/set.go | 4 +- internal/timeutil/location/set_test.go | 4 +- internal/timeutil/rate/rate_test.go | 4 +- internal/timeutil/time_bench_test.go | 4 +- internal/version/version_test.go | 4 +- internal/worker/queue_mock.go | 4 +- k8s/agent/clusterrole.yaml | 0 k8s/agent/clusterrolebinding.yaml | 0 k8s/agent/daemonset.yaml | 0 k8s/agent/deployment.yaml | 0 k8s/agent/faiss/configmap.yaml | 0 k8s/agent/hpa.yaml | 0 k8s/agent/networkpolicy.yaml | 0 k8s/agent/pdb.yaml | 1 + k8s/agent/serviceaccount.yaml | 0 k8s/agent/sidecar/configmap.yaml | 0 k8s/agent/sidecar/svc.yaml | 0 k8s/discoverer/configmap.yaml | 1 + k8s/discoverer/daemonset.yaml | 0 k8s/discoverer/deployment.yaml | 2 +- k8s/discoverer/hpa.yaml | 0 k8s/discoverer/networkpolicy.yaml | 0 k8s/discoverer/pdb.yaml | 1 + k8s/gateway/gateway/filter/configmap.yaml | 0 k8s/gateway/gateway/filter/daemonset.yaml | 0 k8s/gateway/gateway/filter/deployment.yaml | 0 k8s/gateway/gateway/filter/hpa.yaml | 0 k8s/gateway/gateway/filter/networkpolicy.yaml | 0 k8s/gateway/gateway/filter/pdb.yaml | 0 k8s/gateway/gateway/filter/priorityclass.yaml | 0 k8s/gateway/gateway/filter/svc.yaml | 0 k8s/gateway/gateway/lb/configmap.yaml | 2 + k8s/gateway/gateway/lb/daemonset.yaml | 0 k8s/gateway/gateway/lb/deployment.yaml | 2 +- k8s/gateway/gateway/lb/networkpolicy.yaml | 0 k8s/gateway/gateway/lb/pdb.yaml | 1 + k8s/gateway/gateway/mirror/configmap.yaml | 2 +- k8s/gateway/gateway/mirror/daemonset.yaml | 0 k8s/gateway/gateway/mirror/deployment.yaml | 2 +- k8s/gateway/gateway/mirror/networkpolicy.yaml | 0 k8s/gateway/gateway/mirror/pdb.yaml | 1 + k8s/index/job/correction/configmap.yaml | 2 + k8s/index/job/correction/networkpolicy.yaml | 0 k8s/index/job/creation/configmap.yaml | 1 + k8s/index/job/creation/networkpolicy.yaml | 0 .../job/readreplica/rotate/clusterrole.yaml | 0 .../rotate/clusterrolebinding.yaml | 0 .../job/readreplica/rotate/configmap.yaml | 0 .../job/readreplica/rotate/networkpolicy.yaml | 0 .../readreplica/rotate/serviceaccount.yaml | 0 k8s/index/job/save/configmap.yaml | 1 + k8s/index/job/save/networkpolicy.yaml | 0 k8s/manager/index/configmap.yaml | 1 + k8s/manager/index/daemonset.yaml | 0 k8s/manager/index/deployment.yaml | 2 +- k8s/manager/index/networkpolicy.yaml | 0 k8s/manager/index/pdb.yaml | 1 + k8s/operator/helm/crds/valdrelease.yaml | 120 ++++++++++ pkg/agent/core/faiss/config/config_test.go | 4 +- pkg/agent/core/faiss/handler/grpc/flush.go | 4 +- .../core/faiss/handler/grpc/flush_test.go | 4 +- .../core/faiss/handler/grpc/handler_test.go | 4 +- .../core/faiss/handler/grpc/index_test.go | 4 +- .../core/faiss/handler/grpc/insert_test.go | 4 +- .../faiss/handler/grpc/linear_search_test.go | 4 +- .../core/faiss/handler/grpc/object_test.go | 4 +- .../core/faiss/handler/grpc/option_test.go | 4 +- .../core/faiss/handler/grpc/remove_test.go | 4 +- .../core/faiss/handler/grpc/search_test.go | 4 +- .../core/faiss/handler/grpc/update_test.go | 4 +- .../core/faiss/handler/grpc/upsert_test.go | 4 +- .../core/faiss/handler/rest/handler_test.go | 4 +- .../core/faiss/handler/rest/option_test.go | 4 +- pkg/agent/core/faiss/router/option_test.go | 4 +- pkg/agent/core/faiss/router/router_test.go | 4 +- pkg/agent/core/faiss/service/faiss_test.go | 4 +- pkg/agent/core/faiss/service/option_test.go | 4 +- pkg/agent/core/faiss/usecase/agentd_test.go | 4 +- pkg/agent/core/ngt/handler/grpc/flush.go | 4 +- pkg/agent/core/ngt/handler/grpc/flush_test.go | 4 +- pkg/agent/core/ngt/handler/grpc/index.go | 4 +- pkg/agent/core/ngt/handler/grpc/index_test.go | 4 +- pkg/agent/core/ngt/handler/grpc/insert.go | 4 +- .../core/ngt/handler/grpc/insert_test.go | 4 +- .../core/ngt/handler/grpc/linear_search.go | 4 +- .../ngt/handler/grpc/linear_search_test.go | 4 +- pkg/agent/core/ngt/handler/grpc/object.go | 4 +- .../core/ngt/handler/grpc/object_test.go | 4 +- pkg/agent/core/ngt/handler/grpc/remove.go | 4 +- .../core/ngt/handler/grpc/remove_test.go | 4 +- pkg/agent/core/ngt/handler/grpc/search.go | 4 +- .../core/ngt/handler/grpc/search_test.go | 4 +- pkg/agent/core/ngt/handler/grpc/update.go | 4 +- .../core/ngt/handler/grpc/update_test.go | 4 +- pkg/agent/core/ngt/handler/grpc/upsert.go | 4 +- .../core/ngt/handler/grpc/upsert_test.go | 4 +- .../core/ngt/handler/rest/handler_test.go | 4 +- .../core/ngt/handler/rest/option_test.go | 4 +- .../internal/memstore/data_manager_test.go | 4 +- .../sidecar/handler/rest/handler_test.go | 4 +- pkg/agent/sidecar/handler/rest/option_test.go | 4 +- pkg/agent/sidecar/router/option_test.go | 4 +- pkg/agent/sidecar/router/router_test.go | 4 +- .../k8s/handler/rest/handler_test.go | 4 +- .../k8s/handler/rest/option_test.go | 4 +- pkg/discoverer/k8s/router/option_test.go | 4 +- pkg/discoverer/k8s/router/router_test.go | 4 +- pkg/discoverer/k8s/service/discover.go | 78 ++++--- .../filter/handler/rest/handler_test.go | 4 +- .../filter/handler/rest/option_test.go | 4 +- pkg/gateway/filter/router/option_test.go | 4 +- pkg/gateway/filter/router/router_test.go | 4 +- pkg/gateway/lb/handler/grpc/aggregation.go | 4 +- .../lb/handler/grpc/aggregation_test.go | 4 +- pkg/gateway/lb/handler/grpc/handler_test.go | 4 +- pkg/gateway/lb/handler/grpc/option_test.go | 4 +- pkg/gateway/lb/handler/grpc/pairing_heap.go | 4 +- .../lb/handler/grpc/pairing_heap_test.go | 4 +- .../lb/handler/grpc/search_benchmark_test.go | 4 +- pkg/gateway/lb/handler/rest/handler_test.go | 4 +- pkg/gateway/lb/handler/rest/option_test.go | 4 +- pkg/gateway/lb/router/option_test.go | 4 +- pkg/gateway/lb/router/router_test.go | 4 +- pkg/gateway/mirror/config/config.go | 4 +- pkg/gateway/mirror/config/config_test.go | 4 +- pkg/gateway/mirror/handler/doc.go | 4 +- pkg/gateway/mirror/handler/grpc/handler.go | 4 +- .../mirror/handler/grpc/handler_test.go | 4 +- pkg/gateway/mirror/handler/grpc/mock_test.go | 4 +- pkg/gateway/mirror/handler/grpc/option.go | 4 +- .../mirror/handler/grpc/option_test.go | 4 +- pkg/gateway/mirror/handler/rest/handler.go | 4 +- .../mirror/handler/rest/handler_test.go | 4 +- pkg/gateway/mirror/handler/rest/option.go | 4 +- .../mirror/handler/rest/option_test.go | 4 +- pkg/gateway/mirror/router/option.go | 4 +- pkg/gateway/mirror/router/option_test.go | 4 +- pkg/gateway/mirror/router/router.go | 4 +- pkg/gateway/mirror/router/router_test.go | 4 +- pkg/gateway/mirror/service/discovery.go | 4 +- .../mirror/service/discovery_option.go | 4 +- .../mirror/service/discovery_option_test.go | 4 +- pkg/gateway/mirror/service/discovery_test.go | 4 +- pkg/gateway/mirror/service/doc.go | 4 +- pkg/gateway/mirror/service/gateway.go | 4 +- .../mirror/service/gateway_mock_test.go | 4 +- pkg/gateway/mirror/service/gateway_test.go | 4 +- pkg/gateway/mirror/service/mirror.go | 4 +- .../mirror/service/mirror_mock_test.go | 4 +- pkg/gateway/mirror/service/mirror_option.go | 4 +- .../mirror/service/mirror_option_test.go | 4 +- pkg/gateway/mirror/service/mirror_test.go | 4 +- pkg/gateway/mirror/service/option.go | 4 +- pkg/gateway/mirror/service/option_test.go | 4 +- pkg/gateway/mirror/usecase/vald.go | 4 +- pkg/gateway/mirror/usecase/vald_test.go | 4 +- .../job/correction/config/config_test.go | 4 +- pkg/index/job/correction/service/corrector.go | 4 +- .../job/correction/service/corrector_test.go | 4 +- pkg/index/job/correction/service/options.go | 4 +- .../job/correction/service/options_test.go | 4 +- pkg/index/job/correction/usecase/corrector.go | 9 +- .../job/correction/usecase/corrector_test.go | 4 +- pkg/index/job/creation/config/config.go | 4 +- pkg/index/job/creation/config/config_test.go | 4 +- pkg/index/job/creation/service/indexer.go | 4 +- .../job/creation/service/indexer_test.go | 4 +- pkg/index/job/creation/service/options.go | 4 +- .../job/creation/service/options_test.go | 4 +- pkg/index/job/creation/usecase/creation.go | 4 +- .../job/creation/usecase/creation_test.go | 4 +- pkg/index/job/deletion/config/config.go | 4 +- pkg/index/job/deletion/service/deleter.go | 4 +- pkg/index/job/deletion/service/options.go | 4 +- pkg/index/job/deletion/usecase/deletion.go | 4 +- .../job/readreplica/rotate/config/config.go | 4 +- .../readreplica/rotate/config/config_test.go | 4 +- .../job/readreplica/rotate/service/options.go | 4 +- .../rotate/service/options_test.go | 4 +- .../job/readreplica/rotate/service/rotator.go | 4 +- .../rotate/service/rotator_test.go | 4 +- .../job/readreplica/rotate/usecase/rotate.go | 4 +- .../readreplica/rotate/usecase/rotate_test.go | 4 +- pkg/index/job/save/config/config.go | 4 +- pkg/index/job/save/config/config_test.go | 4 +- pkg/index/job/save/service/indexer.go | 4 +- pkg/index/job/save/service/indexer_test.go | 4 +- pkg/index/job/save/service/options.go | 4 +- pkg/index/job/save/service/options_test.go | 4 +- pkg/index/job/save/usecase/save.go | 4 +- pkg/index/job/save/usecase/save_test.go | 4 +- pkg/index/operator/config/config.go | 4 +- pkg/index/operator/config/config_test.go | 4 +- pkg/index/operator/service/operator.go | 4 +- pkg/index/operator/service/options.go | 4 +- pkg/index/operator/service/options_test.go | 4 +- pkg/index/operator/usecase/operator.go | 4 +- pkg/index/operator/usecase/operator_test.go | 4 +- .../index/handler/rest/handler_test.go | 4 +- pkg/manager/index/handler/rest/option_test.go | 4 +- pkg/manager/index/router/option_test.go | 4 +- pkg/manager/index/router/router_test.go | 4 +- pkg/manager/index/service/indexer.go | 6 +- pkg/manager/index/service/indexer_test.go | 18 +- .../job/handler/grpc/handler_test.go | 4 +- .../job/handler/rest/handler_test.go | 4 +- pkg/tools/benchmark/job/router/option_test.go | 4 +- pkg/tools/benchmark/job/router/router_test.go | 4 +- .../benchmark/job/service/insert_test.go | 4 +- pkg/tools/benchmark/job/service/job_test.go | 4 +- .../benchmark/job/service/object_test.go | 4 +- .../benchmark/job/service/option_test.go | 4 +- .../benchmark/job/service/remove_test.go | 4 +- .../benchmark/job/service/search_test.go | 4 +- .../benchmark/job/service/update_test.go | 4 +- .../benchmark/job/service/upsert_test.go | 4 +- .../benchmark/job/usecase/benchmarkd_test.go | 4 +- .../benchmark/operator/config/config_test.go | 4 +- .../operator/handler/grpc/handler_test.go | 4 +- .../operator/handler/rest/handler_test.go | 4 +- .../benchmark/operator/router/option_test.go | 4 +- .../benchmark/operator/router/router_test.go | 4 +- .../operator/service/operator_test.go | 4 +- .../benchmark/operator/service/option_test.go | 4 +- .../operator/usecase/benchmarkd_test.go | 4 +- pkg/tools/cli/loadtest/assets/dataset.go | 4 +- pkg/tools/cli/loadtest/assets/dataset_test.go | 4 +- pkg/tools/cli/loadtest/assets/hdf5_loader.go | 4 +- .../cli/loadtest/assets/hdf5_loader_test.go | 4 +- .../cli/loadtest/assets/large_dataset.go | 4 +- .../cli/loadtest/assets/large_dataset_test.go | 4 +- .../cli/loadtest/assets/small_dataset.go | 4 +- .../cli/loadtest/assets/small_dataset_test.go | 4 +- pkg/tools/cli/loadtest/service/insert.go | 4 +- pkg/tools/cli/loadtest/service/insert_test.go | 4 +- pkg/tools/cli/loadtest/service/loader.go | 4 +- .../cli/loadtest/service/loader_option.go | 4 +- .../loadtest/service/loader_option_test.go | 4 +- pkg/tools/cli/loadtest/service/loader_test.go | 4 +- pkg/tools/cli/loadtest/service/search.go | 4 +- pkg/tools/cli/loadtest/service/search_test.go | 4 +- tests/e2e/crud/crud_test.go | 38 ++- tests/e2e/operation/job.go | 4 +- tests/e2e/operation/multi.go | 4 +- tests/e2e/operation/operation.go | 16 +- tests/e2e/operation/stream.go | 4 +- tests/performance/max_vector_dim_test.go | 4 +- 592 files changed, 2619 insertions(+), 762 deletions(-) create mode 100644 internal/net/quic/conn.go create mode 100644 internal/net/quic/listener.go create mode 100644 k8s/agent/clusterrole.yaml create mode 100644 k8s/agent/clusterrolebinding.yaml create mode 100644 k8s/agent/daemonset.yaml create mode 100644 k8s/agent/deployment.yaml create mode 100644 k8s/agent/faiss/configmap.yaml create mode 100644 k8s/agent/hpa.yaml create mode 100644 k8s/agent/networkpolicy.yaml create mode 100644 k8s/agent/serviceaccount.yaml create mode 100644 k8s/agent/sidecar/configmap.yaml create mode 100644 k8s/agent/sidecar/svc.yaml create mode 100644 k8s/discoverer/daemonset.yaml create mode 100644 k8s/discoverer/hpa.yaml create mode 100644 k8s/discoverer/networkpolicy.yaml create mode 100644 k8s/gateway/gateway/filter/configmap.yaml create mode 100644 k8s/gateway/gateway/filter/daemonset.yaml create mode 100644 k8s/gateway/gateway/filter/deployment.yaml create mode 100644 k8s/gateway/gateway/filter/hpa.yaml create mode 100644 k8s/gateway/gateway/filter/networkpolicy.yaml create mode 100644 k8s/gateway/gateway/filter/pdb.yaml create mode 100644 k8s/gateway/gateway/filter/priorityclass.yaml create mode 100644 k8s/gateway/gateway/filter/svc.yaml create mode 100644 k8s/gateway/gateway/lb/daemonset.yaml create mode 100644 k8s/gateway/gateway/lb/networkpolicy.yaml create mode 100644 k8s/gateway/gateway/mirror/daemonset.yaml create mode 100644 k8s/gateway/gateway/mirror/networkpolicy.yaml create mode 100644 k8s/index/job/correction/networkpolicy.yaml create mode 100644 k8s/index/job/creation/networkpolicy.yaml create mode 100644 k8s/index/job/readreplica/rotate/clusterrole.yaml create mode 100644 k8s/index/job/readreplica/rotate/clusterrolebinding.yaml create mode 100644 k8s/index/job/readreplica/rotate/configmap.yaml create mode 100644 k8s/index/job/readreplica/rotate/networkpolicy.yaml create mode 100644 k8s/index/job/readreplica/rotate/serviceaccount.yaml create mode 100644 k8s/index/job/save/networkpolicy.yaml create mode 100644 k8s/manager/index/daemonset.yaml create mode 100644 k8s/manager/index/networkpolicy.yaml diff --git a/.gitfiles b/.gitfiles index d24c17dd843..6ca9d915d79 100644 --- a/.gitfiles +++ b/.gitfiles @@ -1251,6 +1251,8 @@ internal/net/net.go internal/net/net_test.go internal/net/option.go internal/net/option_test.go +internal/net/quic/conn.go +internal/net/quic/listener.go internal/observability/attribute/attribute.go internal/observability/attribute/attribute_test.go internal/observability/exporter/exporter.go diff --git a/apis/grpc/v1/payload/interface.go b/apis/grpc/v1/payload/interface.go index 22942c6f04f..9fa7a7625bd 100644 --- a/apis/grpc/v1/payload/interface.go +++ b/apis/grpc/v1/payload/interface.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package payload import "google.golang.org/protobuf/reflect/protoreflect" diff --git a/charts/vald-helm-operator/crds/valdrelease.yaml b/charts/vald-helm-operator/crds/valdrelease.yaml index 3469a37af50..024f1dc95d0 100644 --- a/charts/vald-helm-operator/crds/valdrelease.yaml +++ b/charts/vald-helm-operator/crds/valdrelease.yaml @@ -1273,6 +1273,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -2295,6 +2301,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -3171,6 +3183,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -4278,6 +4296,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -4477,6 +4501,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -4671,6 +4701,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -5783,6 +5819,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -5974,6 +6016,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -6167,6 +6215,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -7278,6 +7332,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -7376,6 +7436,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -8444,6 +8510,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -8635,6 +8707,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -8835,6 +8913,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -9747,6 +9831,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -9938,6 +10028,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -10888,6 +10984,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -11079,6 +11181,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -13011,6 +13119,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -13202,6 +13316,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: diff --git a/charts/vald/README.md b/charts/vald/README.md index ba5352746d1..34b45ab451c 100644 --- a/charts/vald/README.md +++ b/charts/vald/README.md @@ -201,9 +201,10 @@ Run the following command to install the chart, | agent.sidecar.config.client.net.dialer.dual_stack_enabled | bool | `false` | HTTP client TCP dialer dual stack enabled | | agent.sidecar.config.client.net.dialer.keepalive | string | `"5m"` | HTTP client TCP dialer keep alive | | agent.sidecar.config.client.net.dialer.timeout | string | `"5s"` | HTTP client TCP dialer connect timeout | -| agent.sidecar.config.client.net.dns.cache_enabled | bool | `true` | HTTP client TCP DNS cache enabled | +| agent.sidecar.config.client.net.dns.cache_enabled | bool | `true` | HTTP client DNS cache enabled | | agent.sidecar.config.client.net.dns.cache_expiration | string | `"24h"` | | -| agent.sidecar.config.client.net.dns.refresh_duration | string | `"1h"` | HTTP client TCP DNS cache expiration | +| agent.sidecar.config.client.net.dns.refresh_duration | string | `"1h"` | HTTP client DNS cache expiration | +| agent.sidecar.config.client.net.network | string | `"tcp"` | gRPC client dialer network type | | agent.sidecar.config.client.net.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | | agent.sidecar.config.client.net.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | | agent.sidecar.config.client.net.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | @@ -320,9 +321,10 @@ Run the following command to install the chart, | defaults.grpc.client.dial_option.net.dialer.dual_stack_enabled | bool | `true` | gRPC client TCP dialer dual stack enabled | | defaults.grpc.client.dial_option.net.dialer.keepalive | string | `""` | gRPC client TCP dialer keep alive | | defaults.grpc.client.dial_option.net.dialer.timeout | string | `""` | gRPC client TCP dialer timeout | -| defaults.grpc.client.dial_option.net.dns.cache_enabled | bool | `true` | gRPC client TCP DNS cache enabled | -| defaults.grpc.client.dial_option.net.dns.cache_expiration | string | `"1h"` | gRPC client TCP DNS cache expiration | -| defaults.grpc.client.dial_option.net.dns.refresh_duration | string | `"30m"` | gRPC client TCP DNS cache refresh duration | +| defaults.grpc.client.dial_option.net.dns.cache_enabled | bool | `true` | gRPC client DNS cache enabled | +| defaults.grpc.client.dial_option.net.dns.cache_expiration | string | `"1h"` | gRPC client DNS cache expiration | +| defaults.grpc.client.dial_option.net.dns.refresh_duration | string | `"30m"` | gRPC client DNS cache refresh duration | +| defaults.grpc.client.dial_option.net.network | string | `"tcp"` | gRPC client dialer network type | | defaults.grpc.client.dial_option.net.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | | defaults.grpc.client.dial_option.net.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | | defaults.grpc.client.dial_option.net.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | @@ -600,9 +602,10 @@ Run the following command to install the chart, | discoverer.discoverer.net.dialer.dual_stack_enabled | bool | `false` | TCP dialer dual stack enabled | | discoverer.discoverer.net.dialer.keepalive | string | `"10m"` | TCP dialer keep alive | | discoverer.discoverer.net.dialer.timeout | string | `"30s"` | TCP dialer timeout | -| discoverer.discoverer.net.dns.cache_enabled | bool | `true` | TCP DNS cache enabled | -| discoverer.discoverer.net.dns.cache_expiration | string | `"24h"` | TCP DNS cache expiration | -| discoverer.discoverer.net.dns.refresh_duration | string | `"5m"` | TCP DNS cache refresh duration | +| discoverer.discoverer.net.dns.cache_enabled | bool | `true` | DNS cache enabled | +| discoverer.discoverer.net.dns.cache_expiration | string | `"24h"` | DNS cache expiration | +| discoverer.discoverer.net.dns.refresh_duration | string | `"5m"` | DNS cache refresh duration | +| discoverer.discoverer.net.network | string | `"tcp"` | gRPC client dialer network type | | discoverer.discoverer.net.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | | discoverer.discoverer.net.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | | discoverer.discoverer.net.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | @@ -826,9 +829,10 @@ Run the following command to install the chart, | gateway.mirror.gateway_config.net.dialer.dual_stack_enabled | bool | `false` | TCP dialer dual stack enabled | | gateway.mirror.gateway_config.net.dialer.keepalive | string | `"10m"` | TCP dialer keep alive | | gateway.mirror.gateway_config.net.dialer.timeout | string | `"30s"` | TCP dialer timeout | -| gateway.mirror.gateway_config.net.dns.cache_enabled | bool | `true` | TCP DNS cache enabled | -| gateway.mirror.gateway_config.net.dns.cache_expiration | string | `"24h"` | TCP DNS cache expiration | -| gateway.mirror.gateway_config.net.dns.refresh_duration | string | `"5m"` | TCP DNS cache refresh duration | +| gateway.mirror.gateway_config.net.dns.cache_enabled | bool | `true` | DNS cache enabled | +| gateway.mirror.gateway_config.net.dns.cache_expiration | string | `"24h"` | DNS cache expiration | +| gateway.mirror.gateway_config.net.dns.refresh_duration | string | `"5m"` | DNS cache refresh duration | +| gateway.mirror.gateway_config.net.network | string | `"tcp"` | | | gateway.mirror.gateway_config.net.socket_option.ip_recover_destination_addr | bool | `false` | server listen socket option for ip_recover_destination_addr functionality | | gateway.mirror.gateway_config.net.socket_option.ip_transparent | bool | `false` | server listen socket option for ip_transparent functionality | | gateway.mirror.gateway_config.net.socket_option.reuse_addr | bool | `true` | server listen socket option for reuse_addr functionality | diff --git a/charts/vald/templates/agent/pdb.yaml b/charts/vald/templates/agent/pdb.yaml index edacf4185d3..6a7d9cbd838 100644 --- a/charts/vald/templates/agent/pdb.yaml +++ b/charts/vald/templates/agent/pdb.yaml @@ -35,4 +35,5 @@ spec: selector: matchLabels: app: {{ $agent.name }} + unhealthyPodEvictionPolicy: {{ $agent.unhealthyPodEvictionPolicy }} {{- end }} diff --git a/charts/vald/templates/discoverer/pdb.yaml b/charts/vald/templates/discoverer/pdb.yaml index 47ac7625c1c..8803edf3349 100644 --- a/charts/vald/templates/discoverer/pdb.yaml +++ b/charts/vald/templates/discoverer/pdb.yaml @@ -35,4 +35,5 @@ spec: selector: matchLabels: app: {{ $discoverer.name }} + unhealthyPodEvictionPolicy: {{ $discoverer.unhealthyPodEvictionPolicy }} {{- end }} diff --git a/charts/vald/templates/gateway/filter/pdb.yaml b/charts/vald/templates/gateway/filter/pdb.yaml index d760816424b..e7196b6bbe0 100644 --- a/charts/vald/templates/gateway/filter/pdb.yaml +++ b/charts/vald/templates/gateway/filter/pdb.yaml @@ -35,4 +35,5 @@ spec: selector: matchLabels: app: {{ $gateway.name }} + unhealthyPodEvictionPolicy: {{ $gateway.unhealthyPodEvictionPolicy }} {{- end }} diff --git a/charts/vald/templates/gateway/lb/pdb.yaml b/charts/vald/templates/gateway/lb/pdb.yaml index deb8601d42b..5b71f5628ca 100644 --- a/charts/vald/templates/gateway/lb/pdb.yaml +++ b/charts/vald/templates/gateway/lb/pdb.yaml @@ -35,4 +35,5 @@ spec: selector: matchLabels: app: {{ $gateway.name }} + unhealthyPodEvictionPolicy: {{ $gateway.unhealthyPodEvictionPolicy }} {{- end }} diff --git a/charts/vald/templates/gateway/mirror/pdb.yaml b/charts/vald/templates/gateway/mirror/pdb.yaml index 4776797849c..13b14a2cf18 100644 --- a/charts/vald/templates/gateway/mirror/pdb.yaml +++ b/charts/vald/templates/gateway/mirror/pdb.yaml @@ -35,4 +35,5 @@ spec: selector: matchLabels: app: {{ $gateway.name }} + unhealthyPodEvictionPolicy: {{ $gateway.unhealthyPodEvictionPolicy }} {{- end }} diff --git a/charts/vald/templates/manager/index/pdb.yaml b/charts/vald/templates/manager/index/pdb.yaml index 78408ad6e42..a75235b8238 100644 --- a/charts/vald/templates/manager/index/pdb.yaml +++ b/charts/vald/templates/manager/index/pdb.yaml @@ -35,4 +35,5 @@ spec: selector: matchLabels: app: {{ $index.name }} + unhealthyPodEvictionPolicy: {{ $index.unhealthyPodEvictionPolicy }} {{- end }} diff --git a/charts/vald/values.go b/charts/vald/values.go index 58e835e21d7..f1af26cddcf 100644 --- a/charts/vald/values.go +++ b/charts/vald/values.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package vald import "github.com/vdaas/vald/internal/config" diff --git a/charts/vald/values.schema.json b/charts/vald/values.schema.json index 0df5814bd51..ef4245c7b00 100644 --- a/charts/vald/values.schema.json +++ b/charts/vald/values.schema.json @@ -1997,18 +1997,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -3768,18 +3773,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -5259,18 +5269,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -7089,18 +7104,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -7444,18 +7464,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -7791,18 +7816,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -9658,18 +9688,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -10001,18 +10036,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -10345,18 +10385,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -12218,18 +12263,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -12400,18 +12450,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -14204,18 +14259,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -14547,18 +14607,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -14905,18 +14970,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -16531,18 +16601,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -16874,18 +16949,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -18558,18 +18638,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -18901,18 +18986,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -22218,18 +22308,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { @@ -22561,18 +22656,23 @@ "properties": { "cache_enabled": { "type": "boolean", - "description": "gRPC client TCP DNS cache enabled" + "description": "gRPC client DNS cache enabled" }, "cache_expiration": { "type": "string", - "description": "gRPC client TCP DNS cache expiration" + "description": "gRPC client DNS cache expiration" }, "refresh_duration": { "type": "string", - "description": "gRPC client TCP DNS cache refresh duration" + "description": "gRPC client DNS cache refresh duration" } } }, + "network": { + "type": "string", + "description": "gRPC client dialer network type", + "enum": ["tcp", "udp", "unix"] + }, "socket_option": { "type": "object", "properties": { diff --git a/charts/vald/values.yaml b/charts/vald/values.yaml index 39347bb890d..bf2e16c05cb 100644 --- a/charts/vald/values.yaml +++ b/charts/vald/values.yaml @@ -823,16 +823,19 @@ defaults: interceptors: [] # @schema {"name": "defaults.grpc.client.dial_option.net", "type": "object", "anchor": "net"} net: + # @schema {"name": "defaults.grpc.client.dial_option.net.network", "type": "string", "enum": ["tcp", "udp", "unix"]} + # defaults.grpc.client.dial_option.net.network -- gRPC client dialer network type + network: tcp # @schema {"name": "defaults.grpc.client.dial_option.net.dns", "type": "object"} dns: # @schema {"name": "defaults.grpc.client.dial_option.net.dns.cache_enabled", "type": "boolean"} - # defaults.grpc.client.dial_option.net.dns.cache_enabled -- gRPC client TCP DNS cache enabled + # defaults.grpc.client.dial_option.net.dns.cache_enabled -- gRPC client DNS cache enabled cache_enabled: true # @schema {"name": "defaults.grpc.client.dial_option.net.dns.refresh_duration", "type": "string"} - # defaults.grpc.client.dial_option.net.dns.refresh_duration -- gRPC client TCP DNS cache refresh duration + # defaults.grpc.client.dial_option.net.dns.refresh_duration -- gRPC client DNS cache refresh duration refresh_duration: 30m # @schema {"name": "defaults.grpc.client.dial_option.net.dns.cache_expiration", "type": "string"} - # defaults.grpc.client.dial_option.net.dns.cache_expiration -- gRPC client TCP DNS cache expiration + # defaults.grpc.client.dial_option.net.dns.cache_expiration -- gRPC client DNS cache expiration cache_expiration: 1h # @schema {"name": "defaults.grpc.client.dial_option.net.dialer", "type": "object"} dialer: @@ -1032,6 +1035,9 @@ gateway: # @schema {"name": "gateway.lb.maxUnavailable", "type": "string"} # gateway.lb.maxUnavailable -- maximum number of unavailable replicas maxUnavailable: 50% + # @schema {"name": "gateway.lb.unhealthyPodEvictionPolicy", "type": "string", "enum": ["AlwaysAllow", "IfHealthyBudget"]} + # gateway.lb.unhealthyPodEvictionPolicy -- controls whether unhealthy pods can be evicted based on the application's healthy pod count, supporting either cautious or permissive eviction. + unhealthyPodEvictionPolicy: "AlwaysAllow" # @schema {"name": "gateway.lb.revisionHistoryLimit", "type": "integer", "minimum": 0} # gateway.lb.revisionHistoryLimit -- number of old history to retain to allow rollback revisionHistoryLimit: 2 @@ -1316,6 +1322,9 @@ gateway: # @schema {"name": "gateway.filter.maxUnavailable", "type": "string"} # gateway.filter.maxUnavailable -- maximum number of unavailable replicas maxUnavailable: 50% + # @schema {"name": "gateway.filter.unhealthyPodEvictionPolicy", "type": "string", "enum": ["AlwaysAllow", "IfHealthyBudget"]} + # gateway.filter.unhealthyPodEvictionPolicy -- controls whether unhealthy pods can be evicted based on the application's healthy pod count, supporting either cautious or permissive eviction. + unhealthyPodEvictionPolicy: "AlwaysAllow" # @schema {"name": "gateway.filter.revisionHistoryLimit", "type": "integer", "minimum": 0} # gateway.filter.revisionHistoryLimit -- number of old history to retain to allow rollback revisionHistoryLimit: 2 @@ -1604,6 +1613,9 @@ gateway: # @schema {"name": "gateway.mirror.maxUnavailable", "type": "string"} # gateway.mirror.maxUnavailable -- maximum number of unavailable replicas maxUnavailable: 50% + # @schema {"name": "gateway.mirror.unhealthyPodEvictionPolicy", "type": "string", "enum": ["AlwaysAllow", "IfHealthyBudget"]} + # gateway.mirror.unhealthyPodEvictionPolicy -- controls whether unhealthy pods can be evicted based on the application's healthy pod count, supporting either cautious or permissive eviction. + unhealthyPodEvictionPolicy: "AlwaysAllow" # @schema {"name": "gateway.mirror.revisionHistoryLimit", "type": "integer", "minimum": 0} # gateway.mirror.revisionHistoryLimit -- number of old history to retain to allow rollback revisionHistoryLimit: 2 @@ -1815,12 +1827,14 @@ gateway: gateway_config: # @schema {"name": "gateway.mirror.gateway_config.net", "alias": "net"} net: + # gateway.mirror.gateway_config.net.network.cache_enabled -- gRPC client dialer network type + network: tcp dns: - # gateway.mirror.gateway_config.net.dns.cache_enabled -- TCP DNS cache enabled + # gateway.mirror.gateway_config.net.dns.cache_enabled -- DNS cache enabled cache_enabled: true - # gateway.mirror.gateway_config.net.dns.refresh_duration -- TCP DNS cache refresh duration + # gateway.mirror.gateway_config.net.dns.refresh_duration -- DNS cache refresh duration refresh_duration: 5m - # gateway.mirror.gateway_config.net.dns.cache_expiration -- TCP DNS cache expiration + # gateway.mirror.gateway_config.net.dns.cache_expiration -- DNS cache expiration cache_expiration: 24h dialer: # gateway.mirror.gateway_config.net.dialer.timeout -- TCP dialer timeout @@ -1955,6 +1969,9 @@ agent: # @schema {"name": "agent.maxUnavailable", "type": "string"} # agent.maxUnavailable -- maximum number of unavailable replicas maxUnavailable: "1" + # @schema {"name": "agent.unhealthyPodEvictionPolicy", "type": "string", "enum": ["AlwaysAllow", "IfHealthyBudget"]} + # agent.unhealthyPodEvictionPolicy -- controls whether unhealthy pods can be evicted based on the application's healthy pod count, supporting either cautious or permissive eviction. + unhealthyPodEvictionPolicy: "IfHealthyBudget" # @schema {"name": "agent.revisionHistoryLimit", "type": "integer", "minimum": 0} # agent.revisionHistoryLimit -- number of old history to retain to allow rollback revisionHistoryLimit: 2 @@ -2630,12 +2647,14 @@ agent: client: # @schema {"name": "agent.sidecar.config.client.net", "alias": "net"} net: + # agent.sidecar.config.client.net.network -- gRPC client dialer network type + network: tcp dns: - # agent.sidecar.config.client.net.dns.cache_enabled -- HTTP client TCP DNS cache enabled + # agent.sidecar.config.client.net.dns.cache_enabled -- HTTP client DNS cache enabled cache_enabled: true - # agent.sidecar.config.client.net.dns.refresh_duration -- HTTP client TCP DNS cache refresh duration + # agent.sidecar.config.client.net.dns.refresh_duration -- HTTP client DNS cache refresh duration refresh_duration: 1h - # agent.sidecar.config.client.net.dns.refresh_duration -- HTTP client TCP DNS cache expiration + # agent.sidecar.config.client.net.dns.refresh_duration -- HTTP client DNS cache expiration cache_expiration: 24h dialer: # agent.sidecar.config.client.net.dialer.timeout -- HTTP client TCP dialer connect timeout @@ -2790,6 +2809,9 @@ discoverer: # @schema {"name": "discoverer.maxUnavailable", "type": "string"} # discoverer.maxUnavailable -- maximum number of unavailable replicas maxUnavailable: 50% + # @schema {"name": "discoverer.unhealthyPodEvictionPolicy", "type": "string", "enum": ["AlwaysAllow", "IfHealthyBudget"]} + # discoverer.unhealthyPodEvictionPolicy -- controls whether unhealthy pods can be evicted based on the application's healthy pod count, supporting either cautious or permissive eviction. + unhealthyPodEvictionPolicy: "AlwaysAllow" # @schema {"name": "discoverer.revisionHistoryLimit", "type": "integer", "minimum": 0} # discoverer.revisionHistoryLimit -- number of old history to retain to allow rollback revisionHistoryLimit: 2 @@ -3005,12 +3027,14 @@ discoverer: fields: {} # @schema {"name": "discoverer.discoverer.net", "alias": "net"} net: + # discoverer.discoverer.net.network -- gRPC client dialer network type + network: tcp dns: - # discoverer.discoverer.net.dns.cache_enabled -- TCP DNS cache enabled + # discoverer.discoverer.net.dns.cache_enabled -- DNS cache enabled cache_enabled: true - # discoverer.discoverer.net.dns.refresh_duration -- TCP DNS cache refresh duration + # discoverer.discoverer.net.dns.refresh_duration -- DNS cache refresh duration refresh_duration: 5m - # discoverer.discoverer.net.dns.cache_expiration -- TCP DNS cache expiration + # discoverer.discoverer.net.dns.cache_expiration -- DNS cache expiration cache_expiration: 24h dialer: # discoverer.discoverer.net.dialer.timeout -- TCP dialer timeout @@ -3111,6 +3135,9 @@ manager: # @schema {"name": "manager.index.maxUnavailable", "type": "string"} # manager.index.maxUnavailable -- maximum number of unavailable replicas maxUnavailable: 50% + # @schema {"name": "manager.index.unhealthyPodEvictionPolicy", "type": "string", "enum": ["AlwaysAllow", "IfHealthyBudget"]} + # manager.index.unhealthyPodEvictionPolicy -- controls whether unhealthy pods can be evicted based on the application's healthy pod count, supporting either cautious or permissive eviction. + unhealthyPodEvictionPolicy: "AlwaysAllow" # @schema {"name": "manager.index.revisionHistoryLimit", "type": "integer", "minimum": 0} # manager.index.revisionHistoryLimit -- number of old history to retain to allow rollback revisionHistoryLimit: 2 diff --git a/cmd/agent/core/faiss/main_test.go b/cmd/agent/core/faiss/main_test.go index db40970b748..1bfdcc04bcd 100644 --- a/cmd/agent/core/faiss/main_test.go +++ b/cmd/agent/core/faiss/main_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main // NOT IMPLEMENTED BELOW diff --git a/cmd/gateway/mirror/main.go b/cmd/gateway/mirror/main.go index a535835e39f..352c1df51e0 100644 --- a/cmd/gateway/mirror/main.go +++ b/cmd/gateway/mirror/main.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main import ( diff --git a/cmd/gateway/mirror/main_test.go b/cmd/gateway/mirror/main_test.go index db40970b748..1bfdcc04bcd 100644 --- a/cmd/gateway/mirror/main_test.go +++ b/cmd/gateway/mirror/main_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main // NOT IMPLEMENTED BELOW diff --git a/cmd/index/job/correction/main.go b/cmd/index/job/correction/main.go index 705f4f5e20e..d765e75ac58 100644 --- a/cmd/index/job/correction/main.go +++ b/cmd/index/job/correction/main.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main import ( diff --git a/cmd/index/job/correction/main_test.go b/cmd/index/job/correction/main_test.go index db40970b748..1bfdcc04bcd 100644 --- a/cmd/index/job/correction/main_test.go +++ b/cmd/index/job/correction/main_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main // NOT IMPLEMENTED BELOW diff --git a/cmd/index/job/creation/main.go b/cmd/index/job/creation/main.go index f43bb58715e..9ce29674b5b 100644 --- a/cmd/index/job/creation/main.go +++ b/cmd/index/job/creation/main.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main import ( diff --git a/cmd/index/job/creation/main_test.go b/cmd/index/job/creation/main_test.go index db40970b748..1bfdcc04bcd 100644 --- a/cmd/index/job/creation/main_test.go +++ b/cmd/index/job/creation/main_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main // NOT IMPLEMENTED BELOW diff --git a/cmd/index/job/deletion/main.go b/cmd/index/job/deletion/main.go index b91c091aa7e..b8ed3679561 100644 --- a/cmd/index/job/deletion/main.go +++ b/cmd/index/job/deletion/main.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main import ( diff --git a/cmd/index/job/readreplica/rotate/main.go b/cmd/index/job/readreplica/rotate/main.go index fe23e3c3a3c..dc662417bdb 100644 --- a/cmd/index/job/readreplica/rotate/main.go +++ b/cmd/index/job/readreplica/rotate/main.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main import ( diff --git a/cmd/index/job/readreplica/rotate/main_test.go b/cmd/index/job/readreplica/rotate/main_test.go index db40970b748..1bfdcc04bcd 100644 --- a/cmd/index/job/readreplica/rotate/main_test.go +++ b/cmd/index/job/readreplica/rotate/main_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main // NOT IMPLEMENTED BELOW diff --git a/cmd/index/job/save/main.go b/cmd/index/job/save/main.go index a5b445ca8b3..eacbd06d14a 100644 --- a/cmd/index/job/save/main.go +++ b/cmd/index/job/save/main.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main import ( diff --git a/cmd/index/job/save/main_test.go b/cmd/index/job/save/main_test.go index db40970b748..1bfdcc04bcd 100644 --- a/cmd/index/job/save/main_test.go +++ b/cmd/index/job/save/main_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main // NOT IMPLEMENTED BELOW diff --git a/cmd/index/operator/main.go b/cmd/index/operator/main.go index bcff12d18e0..71508d40f0f 100644 --- a/cmd/index/operator/main.go +++ b/cmd/index/operator/main.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main import ( diff --git a/cmd/index/operator/main_test.go b/cmd/index/operator/main_test.go index db40970b748..1bfdcc04bcd 100644 --- a/cmd/index/operator/main_test.go +++ b/cmd/index/operator/main_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main // NOT IMPLEMENTED BELOW diff --git a/cmd/tools/benchmark/job/main_test.go b/cmd/tools/benchmark/job/main_test.go index db40970b748..1bfdcc04bcd 100644 --- a/cmd/tools/benchmark/job/main_test.go +++ b/cmd/tools/benchmark/job/main_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main // NOT IMPLEMENTED BELOW diff --git a/cmd/tools/benchmark/operator/main_test.go b/cmd/tools/benchmark/operator/main_test.go index db40970b748..1bfdcc04bcd 100644 --- a/cmd/tools/benchmark/operator/main_test.go +++ b/cmd/tools/benchmark/operator/main_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main // NOT IMPLEMENTED BELOW diff --git a/cmd/tools/cli/benchmark/core/main_test.go b/cmd/tools/cli/benchmark/core/main_test.go index be6c73c06d8..6d9af6f7961 100644 --- a/cmd/tools/cli/benchmark/core/main_test.go +++ b/cmd/tools/cli/benchmark/core/main_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main // NOT IMPLEMENTED BELOW diff --git a/cmd/tools/cli/loadtest/main.go b/cmd/tools/cli/loadtest/main.go index 205cf869338..711372ec23f 100644 --- a/cmd/tools/cli/loadtest/main.go +++ b/cmd/tools/cli/loadtest/main.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main import ( diff --git a/cmd/tools/cli/loadtest/main_test.go b/cmd/tools/cli/loadtest/main_test.go index db40970b748..1bfdcc04bcd 100644 --- a/cmd/tools/cli/loadtest/main_test.go +++ b/cmd/tools/cli/loadtest/main_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main // NOT IMPLEMENTED BELOW diff --git a/example/client/agent/main.go b/example/client/agent/main.go index d3eaa9d9bc3..fab8c0ad541 100644 --- a/example/client/agent/main.go +++ b/example/client/agent/main.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main import ( diff --git a/example/client/go.mod b/example/client/go.mod index 5bd06cb1a9c..61a9297d94a 100644 --- a/example/client/go.mod +++ b/example/client/go.mod @@ -1,6 +1,6 @@ module github.com/vdaas/vald/example/client -go 1.23.2 +go 1.23.3 replace ( github.com/envoyproxy/protoc-gen-validate => github.com/envoyproxy/protoc-gen-validate v1.1.0 diff --git a/example/client/go.mod.default b/example/client/go.mod.default index 205d365b8ec..b7cb0ee2a2f 100644 --- a/example/client/go.mod.default +++ b/example/client/go.mod.default @@ -1,6 +1,6 @@ module github.com/vdaas/vald/example/client -go 1.23.2 +go 1.23.3 replace ( github.com/envoyproxy/protoc-gen-validate => github.com/envoyproxy/protoc-gen-validate latest diff --git a/example/client/main.go b/example/client/main.go index f8a051d86e4..7583261ca65 100644 --- a/example/client/main.go +++ b/example/client/main.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main import ( diff --git a/example/client/mirror/main.go b/example/client/mirror/main.go index 3bd03181662..7072b9509aa 100644 --- a/example/client/mirror/main.go +++ b/example/client/mirror/main.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main import ( diff --git a/go.mod b/go.mod index 7f10394c441..bdbc797ae0f 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/vdaas/vald -go 1.23.2 +go 1.23.3 replace ( cloud.google.com/go => cloud.google.com/go v0.116.0 @@ -196,7 +196,7 @@ replace ( github.com/klauspost/cpuid/v2 => github.com/klauspost/cpuid/v2 v2.2.9 github.com/kpango/fastime => github.com/kpango/fastime v1.1.9 github.com/kpango/fuid => github.com/kpango/fuid v0.0.0-20221203053508-503b5ad89aa1 - github.com/kpango/gache/v2 => github.com/kpango/gache/v2 v2.1.0 + github.com/kpango/gache/v2 => github.com/kpango/gache/v2 v2.1.1 github.com/kpango/glg => github.com/kpango/glg v1.6.15 github.com/kr/fs => github.com/kr/fs v0.1.0 github.com/kr/pretty => github.com/kr/pretty v0.3.1 @@ -378,6 +378,7 @@ require ( github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 github.com/quasilyte/go-ruleguard v0.0.0-00010101000000-000000000000 github.com/quasilyte/go-ruleguard/dsl v0.3.22 + github.com/quic-go/quic-go v0.48.1 github.com/scylladb/gocqlx v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.9.0 github.com/unum-cloud/usearch/golang v0.0.0-20241104182314-dccdd8e4152d @@ -461,6 +462,7 @@ require ( github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/go-pdf/fpdf v0.9.0 // indirect + github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/go-toolsmith/astcopy v1.0.2 // indirect github.com/go-toolsmith/astequal v1.1.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -497,6 +499,7 @@ require ( github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect + github.com/onsi/ginkgo/v2 v2.21.0 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect @@ -517,6 +520,7 @@ require ( go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect + go.uber.org/mock v0.4.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.29.0 // indirect golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect diff --git a/go.sum b/go.sum index 8f92d9b291b..4ede379c087 100644 --- a/go.sum +++ b/go.sum @@ -382,7 +382,6 @@ github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= -github.com/go-task/slim-sprig v2.20.0+incompatible h1:4Xh3bDzO29j4TWNOI+24ubc0vbVFMg2PMnXKxK54/CA= github.com/go-task/slim-sprig v2.20.0+incompatible/go.mod h1:N/mhXZITr/EQAOErEHciKvO1bFei2Lld2Ym6h96pdy0= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= @@ -524,8 +523,8 @@ github.com/kpango/fastime v1.1.9 h1:xVQHcqyPt5M69DyFH7g1EPRns1YQNap9d5eLhl/Jy84= github.com/kpango/fastime v1.1.9/go.mod h1:vyD7FnUn08zxY4b/QFBZVG+9EWMYsNl+QF0uE46urD4= github.com/kpango/fuid v0.0.0-20221203053508-503b5ad89aa1 h1:rxyM+7uaZQ35P9fbixdnld/h4AgEhODoubuy6A4nDdk= github.com/kpango/fuid v0.0.0-20221203053508-503b5ad89aa1/go.mod h1:CAYeq6us9NfnRkSz67/xKVIR6/vaY5ZQZRe6IVcaIKg= -github.com/kpango/gache/v2 v2.1.0 h1:QghBsCQFFSGc3cLuD1rpHRy73Pd095hhv3eyxjf7+40= -github.com/kpango/gache/v2 v2.1.0/go.mod h1:0YTbg//JH4Zylm/8LNHRaSbiXphcFStdVhiftgVpPds= +github.com/kpango/gache/v2 v2.1.1 h1:nOuVy7saIbs+tMtOyvPIf71Be2lUL88ymV7SQoICOkw= +github.com/kpango/gache/v2 v2.1.1/go.mod h1:c5WoO35SM5xq4x8K+QkTwh5xsjokfL3yKsLUUtDll+c= github.com/kpango/glg v1.6.15 h1:nw0xSxpSyrDIWHeb3dvnE08PW+SCbK+aYFETT75IeLA= github.com/kpango/glg v1.6.15/go.mod h1:cmsc7Yeu8AS3wHLmN7bhwENXOpxfq+QoqxCIk2FneRk= github.com/kpango/go-hostpool v0.0.0-20210303030322-aab80263dcd0 h1:orIEVdc68woWO1ZyYWEVOl5Kl33eDjP+kbxgbdpMwi4= @@ -622,6 +621,8 @@ github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOA github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= +github.com/quic-go/quic-go v0.48.1 h1:y/8xmfWI9qmGTc+lBr4jKRUWLGSlSigv847ULJ4hYXA= +github.com/quic-go/quic-go v0.48.1/go.mod h1:yBgs3rWBOADpga7F+jJsb6Ybg1LSYiQvwWlLX+/6HMs= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -716,6 +717,8 @@ go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= +go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/ratelimit v0.3.1 h1:K4qVE+byfv/B3tC+4nYWP7v/6SimcO7HzHekoMNBma0= diff --git a/hack/actions/gen/main_test.go b/hack/actions/gen/main_test.go index 7b569c75b8b..45e0b438889 100644 --- a/hack/actions/gen/main_test.go +++ b/hack/actions/gen/main_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main // NOT IMPLEMENTED BELOW diff --git a/hack/benchmark/assets/x1b/loader.go b/hack/benchmark/assets/x1b/loader.go index ecb126bd9ee..fe668ced0ad 100644 --- a/hack/benchmark/assets/x1b/loader.go +++ b/hack/benchmark/assets/x1b/loader.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package x1b import ( diff --git a/hack/benchmark/assets/x1b/loader_bench_test.go b/hack/benchmark/assets/x1b/loader_bench_test.go index 486e6d40548..6dbef9155de 100644 --- a/hack/benchmark/assets/x1b/loader_bench_test.go +++ b/hack/benchmark/assets/x1b/loader_bench_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package x1b import "testing" diff --git a/hack/benchmark/assets/x1b/loader_test.go b/hack/benchmark/assets/x1b/loader_test.go index 6b0f0a9d129..4fd49b6c0ee 100644 --- a/hack/benchmark/assets/x1b/loader_test.go +++ b/hack/benchmark/assets/x1b/loader_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package x1b // NOT IMPLEMENTED BELOW diff --git a/hack/benchmark/e2e/agent/core/ngt/ngt_bench_test.go b/hack/benchmark/e2e/agent/core/ngt/ngt_bench_test.go index a27f1f164df..96f6c6f2a46 100644 --- a/hack/benchmark/e2e/agent/core/ngt/ngt_bench_test.go +++ b/hack/benchmark/e2e/agent/core/ngt/ngt_bench_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package ngt import ( diff --git a/hack/benchmark/internal/assets/dataset.go b/hack/benchmark/internal/assets/dataset.go index c6c05b5bec0..f22c71059f6 100644 --- a/hack/benchmark/internal/assets/dataset.go +++ b/hack/benchmark/internal/assets/dataset.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package assets import ( diff --git a/hack/benchmark/internal/assets/dataset_test.go b/hack/benchmark/internal/assets/dataset_test.go index 3706aaf4429..87d37898ce5 100644 --- a/hack/benchmark/internal/assets/dataset_test.go +++ b/hack/benchmark/internal/assets/dataset_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package assets // NOT IMPLEMENTED BELOW diff --git a/hack/benchmark/internal/operation/insert.go b/hack/benchmark/internal/operation/insert.go index ddf1be7ba7f..357c5fec9bb 100644 --- a/hack/benchmark/internal/operation/insert.go +++ b/hack/benchmark/internal/operation/insert.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation import ( diff --git a/hack/benchmark/internal/operation/insert_test.go b/hack/benchmark/internal/operation/insert_test.go index 5b507b3fe32..aba9d6df1d4 100644 --- a/hack/benchmark/internal/operation/insert_test.go +++ b/hack/benchmark/internal/operation/insert_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation // NOT IMPLEMENTED BELOW diff --git a/hack/benchmark/internal/operation/operation.go b/hack/benchmark/internal/operation/operation.go index ed5a5e2a6fc..cd062e4ea43 100644 --- a/hack/benchmark/internal/operation/operation.go +++ b/hack/benchmark/internal/operation/operation.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation import ( diff --git a/hack/benchmark/internal/operation/operation_test.go b/hack/benchmark/internal/operation/operation_test.go index 2e1dbfc3473..7406065294a 100644 --- a/hack/benchmark/internal/operation/operation_test.go +++ b/hack/benchmark/internal/operation/operation_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation // NOT IMPLEMENTED BELOW diff --git a/hack/benchmark/internal/operation/option.go b/hack/benchmark/internal/operation/option.go index 886d3ffb658..5ab044a9f57 100644 --- a/hack/benchmark/internal/operation/option.go +++ b/hack/benchmark/internal/operation/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation import "github.com/vdaas/vald/internal/client/v1/client" diff --git a/hack/benchmark/internal/operation/option_test.go b/hack/benchmark/internal/operation/option_test.go index 7b40c8515d3..ea745dbf049 100644 --- a/hack/benchmark/internal/operation/option_test.go +++ b/hack/benchmark/internal/operation/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation // NOT IMPLEMENTED BELOW diff --git a/hack/benchmark/internal/operation/remove.go b/hack/benchmark/internal/operation/remove.go index 7c7f4d6ea5a..81fcbdb6d14 100644 --- a/hack/benchmark/internal/operation/remove.go +++ b/hack/benchmark/internal/operation/remove.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation import ( diff --git a/hack/benchmark/internal/operation/remove_test.go b/hack/benchmark/internal/operation/remove_test.go index 67d48d5badd..ae52a6a5176 100644 --- a/hack/benchmark/internal/operation/remove_test.go +++ b/hack/benchmark/internal/operation/remove_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation // NOT IMPLEMENTED BELOW diff --git a/hack/benchmark/internal/operation/search.go b/hack/benchmark/internal/operation/search.go index 8c686275fa7..b85724609aa 100644 --- a/hack/benchmark/internal/operation/search.go +++ b/hack/benchmark/internal/operation/search.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation import ( diff --git a/hack/benchmark/internal/operation/search_test.go b/hack/benchmark/internal/operation/search_test.go index dffcc532e6c..168c934982f 100644 --- a/hack/benchmark/internal/operation/search_test.go +++ b/hack/benchmark/internal/operation/search_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation // NOT IMPLEMENTED BELOW diff --git a/hack/benchmark/internal/operation/util.go b/hack/benchmark/internal/operation/util.go index a35c14454f6..0a3b9756719 100644 --- a/hack/benchmark/internal/operation/util.go +++ b/hack/benchmark/internal/operation/util.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation import ( diff --git a/hack/benchmark/internal/operation/util_test.go b/hack/benchmark/internal/operation/util_test.go index 31b3bb5473e..6af9eaaa86f 100644 --- a/hack/benchmark/internal/operation/util_test.go +++ b/hack/benchmark/internal/operation/util_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation // NOT IMPLEMENTED BELOW diff --git a/hack/benchmark/metrics/metrics.go b/hack/benchmark/metrics/metrics.go index 018565fd432..2cf87397083 100644 --- a/hack/benchmark/metrics/metrics.go +++ b/hack/benchmark/metrics/metrics.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package metrics type SearchMetrics struct { diff --git a/hack/benchmark/src/singleflight/singleflight_bench_test.go b/hack/benchmark/src/singleflight/singleflight_bench_test.go index a767e1672c6..4f89042e86d 100644 --- a/hack/benchmark/src/singleflight/singleflight_bench_test.go +++ b/hack/benchmark/src/singleflight/singleflight_bench_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package singleflight import ( diff --git a/hack/cspell/main.go b/hack/cspell/main.go index f475f4a0fe2..93acf620f77 100644 --- a/hack/cspell/main.go +++ b/hack/cspell/main.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main import ( diff --git a/hack/cspell/main_test.go b/hack/cspell/main_test.go index a11c66b0624..5ad50469bd8 100644 --- a/hack/cspell/main_test.go +++ b/hack/cspell/main_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main // NOT IMPLEMENTED BELOW diff --git a/hack/go.mod.default b/hack/go.mod.default index 328d025592f..436c759ab63 100644 --- a/hack/go.mod.default +++ b/hack/go.mod.default @@ -1,6 +1,6 @@ module github.com/vdaas/vald -go 1.23.2 +go 1.23.3 replace ( cloud.google.com/go => cloud.google.com/go upgrade diff --git a/hack/gorules/rules.go b/hack/gorules/rules.go index d130fe4a066..64f65bb1a91 100644 --- a/hack/gorules/rules.go +++ b/hack/gorules/rules.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package gorules import "github.com/quasilyte/go-ruleguard/dsl" diff --git a/hack/gorules/rules_test.go b/hack/gorules/rules_test.go index 71be1768e3c..3db994d564f 100644 --- a/hack/gorules/rules_test.go +++ b/hack/gorules/rules_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package gorules import ( diff --git a/hack/gorules/testdata/tests.go b/hack/gorules/testdata/tests.go index a8ad5452abe..66ced78c5b3 100644 --- a/hack/gorules/testdata/tests.go +++ b/hack/gorules/testdata/tests.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package testdata import ( diff --git a/hack/tools/deadlink/main.go b/hack/tools/deadlink/main.go index 098523acf76..cd0d6b84420 100644 --- a/hack/tools/deadlink/main.go +++ b/hack/tools/deadlink/main.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main import ( diff --git a/hack/tools/metrics/main.go b/hack/tools/metrics/main.go index ad1bab88276..ee66bbdad3c 100644 --- a/hack/tools/metrics/main.go +++ b/hack/tools/metrics/main.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main import ( diff --git a/hack/tools/metrics/main_test.go b/hack/tools/metrics/main_test.go index 7bd2307ff1f..163adf839b1 100644 --- a/hack/tools/metrics/main_test.go +++ b/hack/tools/metrics/main_test.go @@ -1,14 +1,16 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package main diff --git a/internal/backoff/context.go b/internal/backoff/context.go index 1ea7e7c1990..3b1ac43ccb5 100644 --- a/internal/backoff/context.go +++ b/internal/backoff/context.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package backoff import "context" diff --git a/internal/backoff/context_test.go b/internal/backoff/context_test.go index 018eac8a4be..68485640ff7 100644 --- a/internal/backoff/context_test.go +++ b/internal/backoff/context_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package backoff // NOT IMPLEMENTED BELOW diff --git a/internal/backoff/option_test.go b/internal/backoff/option_test.go index cb18c3e819e..e3443468c73 100644 --- a/internal/backoff/option_test.go +++ b/internal/backoff/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package backoff import ( diff --git a/internal/circuitbreaker/breaker.go b/internal/circuitbreaker/breaker.go index 81f3a455efa..2119854998c 100644 --- a/internal/circuitbreaker/breaker.go +++ b/internal/circuitbreaker/breaker.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuitbreaker import ( diff --git a/internal/circuitbreaker/breaker_test.go b/internal/circuitbreaker/breaker_test.go index 71df0681bbc..5736d3f2362 100644 --- a/internal/circuitbreaker/breaker_test.go +++ b/internal/circuitbreaker/breaker_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuitbreaker import ( diff --git a/internal/circuitbreaker/counter.go b/internal/circuitbreaker/counter.go index 062444132f6..0eded10ddba 100644 --- a/internal/circuitbreaker/counter.go +++ b/internal/circuitbreaker/counter.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuitbreaker import "sync/atomic" diff --git a/internal/circuitbreaker/counter_test.go b/internal/circuitbreaker/counter_test.go index 91297871c3b..296b64aefe1 100644 --- a/internal/circuitbreaker/counter_test.go +++ b/internal/circuitbreaker/counter_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuitbreaker // NOT IMPLEMENTED BELOW diff --git a/internal/circuitbreaker/manager.go b/internal/circuitbreaker/manager.go index 756cfd15162..031e5736ea7 100644 --- a/internal/circuitbreaker/manager.go +++ b/internal/circuitbreaker/manager.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuitbreaker import ( diff --git a/internal/circuitbreaker/manager_test.go b/internal/circuitbreaker/manager_test.go index c3ca6720826..bf00d229e0f 100644 --- a/internal/circuitbreaker/manager_test.go +++ b/internal/circuitbreaker/manager_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuitbreaker // NOT IMPLEMENTED BELOW diff --git a/internal/circuitbreaker/options.go b/internal/circuitbreaker/options.go index 9b02e8abe08..df476fc34f8 100644 --- a/internal/circuitbreaker/options.go +++ b/internal/circuitbreaker/options.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuitbreaker import ( diff --git a/internal/circuitbreaker/options_test.go b/internal/circuitbreaker/options_test.go index 8cc1f0ea8f3..fae84393c32 100644 --- a/internal/circuitbreaker/options_test.go +++ b/internal/circuitbreaker/options_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuitbreaker // NOT IMPLEMENTED BELOW diff --git a/internal/circuitbreaker/state.go b/internal/circuitbreaker/state.go index d89889bea6e..7b886144f4a 100644 --- a/internal/circuitbreaker/state.go +++ b/internal/circuitbreaker/state.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuitbreaker type State uint32 diff --git a/internal/circuitbreaker/state_test.go b/internal/circuitbreaker/state_test.go index cf5d59fed98..f6126550c51 100644 --- a/internal/circuitbreaker/state_test.go +++ b/internal/circuitbreaker/state_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuitbreaker // NOT IMPLEMENTED BELOW diff --git a/internal/circuitbreaker/tripper.go b/internal/circuitbreaker/tripper.go index 995a59eeeef..b2cc2ff3522 100644 --- a/internal/circuitbreaker/tripper.go +++ b/internal/circuitbreaker/tripper.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuitbreaker // Tripper is a function type to determine if the CircuitBreaker should trip. diff --git a/internal/circuitbreaker/tripper_test.go b/internal/circuitbreaker/tripper_test.go index 67179dd16d7..6ce82d7277f 100644 --- a/internal/circuitbreaker/tripper_test.go +++ b/internal/circuitbreaker/tripper_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuitbreaker // NOT IMPLEMENTED BELOW diff --git a/internal/client/v1/client/discoverer/discover.go b/internal/client/v1/client/discoverer/discover.go index 83c98c46db2..c8afd0916d6 100644 --- a/internal/client/v1/client/discoverer/discover.go +++ b/internal/client/v1/client/discoverer/discover.go @@ -18,8 +18,10 @@ package discoverer import ( + "cmp" "context" "reflect" + "slices" "sync/atomic" "time" @@ -96,16 +98,16 @@ func (c *client) Start(ctx context.Context) (<-chan error, error) { } } - ech := make(chan error, 100) - addrs, err := c.dnsDiscovery(ctx, ech) - if err != nil { - close(ech) - return nil, err + addrs, err := c.updateDiscoveryInfo(ctx) + if err != nil || len(addrs) == 0 { + addrs, err = c.dnsDiscovery(ctx) + if err != nil { + return nil, err + } } - c.addrs.Store(&addrs) var aech <-chan error - if c.autoconn { + if c.client == nil { c.client = grpc.New( append( c.opts, @@ -113,23 +115,38 @@ func (c *client) Start(ctx context.Context) (<-chan error, error) { grpc.WithErrGroup(c.eg), )..., ) - if c.client != nil { - aech, err = c.client.StartConnectionMonitor(ctx) + aech, err = c.client.StartConnectionMonitor(ctx) + if err != nil { + return nil, err + } + for _, addr := range addrs { + if c.onConnect != nil { + err = c.onConnect(ctx, c, addr) + if err != nil { + return nil, err + } + } + } + } else { + for _, addr := range addrs { + err = c.connect(ctx, addr) if err != nil { - close(ech) return nil, err } } + aech, err = c.client.StartConnectionMonitor(ctx) } + if err != nil { + return nil, err + } + c.addrs.Store(&addrs) - err = c.discover(ctx, ech) + err = c.discover(ctx) if err != nil { - close(ech) return nil, errors.Join(c.dscClient.Close(ctx), err) } - + ech := make(chan error, 100) c.eg.Go(safety.RecoverFunc(func() (err error) { - defer close(ech) dt := time.NewTicker(c.dscDur) defer dt.Stop() finalize := func() (err error) { @@ -158,7 +175,7 @@ func (c *client) Start(ctx context.Context) (<-chan error, error) { case err = <-aech: case err = <-rrech: case <-dt.C: - err = c.discover(ctx, ech) + err = c.discover(ctx) } if err != nil { log.Error(err) @@ -177,14 +194,11 @@ func (c *client) Start(ctx context.Context) (<-chan error, error) { func (c *client) GetAddrs(ctx context.Context) (addrs []string) { a := c.addrs.Load() if a == nil { - ips, err := net.DefaultResolver.LookupIPAddr(ctx, c.dns) + var err error + addrs, err = c.dnsDiscovery(ctx) if err != nil { return nil } - addrs = make([]string, 0, len(ips)) - for _, ip := range ips { - addrs = append(addrs, ip.String()) - } } else { addrs = *a } @@ -217,7 +231,7 @@ func (c *client) GetReadClient() grpc.Client { func (c *client) connect(ctx context.Context, addr string) (err error) { if c.autoconn && c.client != nil { - _, err = c.client.Connect(ctx, addr) + _, err = c.client.Connect(ctx, addr, c.client.GetDialOption()...) if err != nil { return err } @@ -238,7 +252,7 @@ func (c *client) disconnect(ctx context.Context, addr string) (err error) { return } -func (c *client) dnsDiscovery(ctx context.Context, ech chan<- error) (addrs []string, err error) { +func (c *client) dnsDiscovery(ctx context.Context) (addrs []string, err error) { ips, err := net.DefaultResolver.LookupIPAddr(ctx, c.dns) if err != nil || len(ips) == 0 { return nil, errors.ErrAddrCouldNotDiscover(err, c.dns) @@ -249,7 +263,6 @@ func (c *client) dnsDiscovery(ctx context.Context, ech chan<- error) (addrs []st addr := net.JoinHostPort(ip.String(), uint16(c.port)) if err = c.connect(ctx, addr); err != nil { log.Debugf("dns discovery connect for addr = %s from dns = %s failed %v", addr, c.dns, err) - ech <- err } else { log.Debugf("dns discovery connect for addr = %s from dns = %s succeeded", addr, c.dns) addrs = append(addrs, addr) @@ -264,7 +277,7 @@ func (c *client) dnsDiscovery(ctx context.Context, ech chan<- error) (addrs []st return addrs, nil } -func (c *client) discover(ctx context.Context, ech chan<- error) (err error) { +func (c *client) discover(ctx context.Context) (err error) { if c.dscClient == nil || (c.autoconn && c.client == nil) { return errors.ErrGRPCClientNotFound } @@ -272,7 +285,7 @@ func (c *client) discover(ctx context.Context, ech chan<- error) (err error) { var connected []string if bo := c.client.GetBackoff(); bo != nil { _, err = bo.Do(ctx, func(ctx context.Context) (any, bool, error) { - connected, err = c.updateDiscoveryInfo(ctx, ech) + connected, err = c.updateDiscoveryInfo(ctx) if err != nil { if !errors.Is(err, errors.ErrGRPCClientNotFound) && !errors.Is(err, errors.ErrGRPCClientConnNotFound("*")) { @@ -283,11 +296,11 @@ func (c *client) discover(ctx context.Context, ech chan<- error) (err error) { return nil, false, nil }) } else { - connected, err = c.updateDiscoveryInfo(ctx, ech) + connected, err = c.updateDiscoveryInfo(ctx) } if err != nil { log.Warnf("failed to discover addrs from discoverer API, error: %v,\ttrying to dns discovery from %s...", err, c.dns) - connected, err = c.dnsDiscovery(ctx, ech) + connected, err = c.dnsDiscovery(ctx) if err != nil { return err } @@ -295,12 +308,10 @@ func (c *client) discover(ctx context.Context, ech chan<- error) (err error) { oldAddrs := c.GetAddrs(ctx) c.addrs.Store(&connected) - return c.disconnectOldAddrs(ctx, oldAddrs, connected, ech) + return c.disconnectOldAddrs(ctx, oldAddrs, connected) } -func (c *client) updateDiscoveryInfo( - ctx context.Context, ech chan<- error, -) (connected []string, err error) { +func (c *client) updateDiscoveryInfo(ctx context.Context) (connected []string, err error) { nodes, err := c.discoverNodes(ctx) if err != nil { log.Warnf("error detected when discovering nodes,\terrors: %v", err) @@ -310,7 +321,7 @@ func (c *client) updateDiscoveryInfo( log.Warn("no nodes found") return nil, errors.ErrNodeNotFound("all") } - connected, err = c.discoverAddrs(ctx, nodes, ech) + connected, err = c.discoverAddrs(ctx, nodes) if err != nil { return nil, err } @@ -343,19 +354,39 @@ func (c *client) discoverNodes(ctx context.Context) (nodes *payload.Info_Nodes, } return nodes, nil }) - return nodes, err + if err != nil { + return nil, err + } + slices.SortFunc(nodes.Nodes, func(left, right *payload.Info_Node) int { + if left.GetMemory() == nil || right.GetMemory() == nil { + return 0 // Default comparison value; adjust as needed. + } + return cmp.Compare(left.GetMemory().GetUsage(), right.GetMemory().GetUsage()) + }) + return nodes, nil } func (c *client) discoverAddrs( - ctx context.Context, nodes *payload.Info_Nodes, ech chan<- error, + ctx context.Context, nodes *payload.Info_Nodes, ) (addrs []string, err error) { + if nodes == nil { + return nil, errors.ErrAddrCouldNotDiscover(err, c.dns) + } maxPodLen := 0 podLength := 0 - for _, node := range nodes.GetNodes() { - l := len(node.GetPods().GetPods()) - podLength += l - if l > maxPodLen { - maxPodLen = l + for i, node := range nodes.GetNodes() { + if node != nil && node.GetPods() != nil && node.GetPods().GetPods() != nil { + l := len(node.GetPods().GetPods()) + podLength += l + if l > maxPodLen { + maxPodLen = l + } + slices.SortFunc(nodes.Nodes[i].Pods.Pods, func(left, right *payload.Info_Pod) int { + if left.GetMemory() == nil || right.GetMemory() == nil { + return 0 // Default comparison value; adjust as needed. + } + return cmp.Compare(left.GetMemory().GetUsage(), right.GetMemory().GetUsage()) + }) } } addrs = make([]string, 0, podLength) @@ -371,15 +402,12 @@ func (c *client) discoverAddrs( len(node.GetPods().GetPods()[i].GetIp()) != 0 { addr := net.JoinHostPort(node.GetPods().GetPods()[i].GetIp(), uint16(c.port)) if err = c.connect(ctx, addr); err != nil { - select { - case <-ctx.Done(): - return nil, ctx.Err() - case ech <- errors.ErrAddrCouldNotDiscover(err, addr): - } + log.Debugf("resource based discovery connect from discoverer API for addr = %s failed %v", addr, errors.ErrAddrCouldNotDiscover(err, addr)) err = nil } else { addrs = append(addrs, addr) } + } } } @@ -388,7 +416,7 @@ func (c *client) discoverAddrs( } func (c *client) disconnectOldAddrs( - ctx context.Context, oldAddrs, connectedAddrs []string, ech chan<- error, + ctx context.Context, oldAddrs, connectedAddrs []string, ) (err error) { if !c.autoconn { return nil @@ -404,7 +432,7 @@ func (c *client) disconnectOldAddrs( c.eg.Go(safety.RecoverFunc(func() error { err = c.disconnect(ctx, old) if err != nil { - ech <- err + log.Error(err) } return nil })) @@ -420,22 +448,12 @@ func (c *client) disconnectOldAddrs( if !ok { err = c.disconnect(ctx, addr) if err != nil { - select { - case <-ctx.Done(): - return errors.Join(ctx.Err(), err) - case ech <- err: - return err - } + return err } } return nil }); err != nil { - select { - case <-ctx.Done(): - return errors.Join(ctx.Err(), err) - case ech <- err: - return err - } + log.Error(err) } } return nil diff --git a/internal/client/v1/client/mirror/mirror.go b/internal/client/v1/client/mirror/mirror.go index de28b66eb24..60365e19e53 100644 --- a/internal/client/v1/client/mirror/mirror.go +++ b/internal/client/v1/client/mirror/mirror.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package mirror import ( diff --git a/internal/client/v1/client/mirror/mirror_test.go b/internal/client/v1/client/mirror/mirror_test.go index 0ff5b364aa5..d6bc4985c7e 100644 --- a/internal/client/v1/client/mirror/mirror_test.go +++ b/internal/client/v1/client/mirror/mirror_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package mirror // NOT IMPLEMENTED BELOW diff --git a/internal/client/v1/client/mirror/option.go b/internal/client/v1/client/mirror/option.go index 981dd69f81f..cd9693cf21e 100644 --- a/internal/client/v1/client/mirror/option.go +++ b/internal/client/v1/client/mirror/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package mirror import "github.com/vdaas/vald/internal/net/grpc" diff --git a/internal/client/v1/client/mirror/option_test.go b/internal/client/v1/client/mirror/option_test.go index faaf26df0da..d12450964e7 100644 --- a/internal/client/v1/client/mirror/option_test.go +++ b/internal/client/v1/client/mirror/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package mirror // NOT IMPLEMENTED BELOW diff --git a/internal/compress/gob/gob.go b/internal/compress/gob/gob.go index cfaff138394..ef71798dc40 100644 --- a/internal/compress/gob/gob.go +++ b/internal/compress/gob/gob.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package gob import ( diff --git a/internal/compress/gob/gob_mock.go b/internal/compress/gob/gob_mock.go index c37f4ff8acb..f05ac0cc037 100644 --- a/internal/compress/gob/gob_mock.go +++ b/internal/compress/gob/gob_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package gob import "github.com/vdaas/vald/internal/io" diff --git a/internal/compress/gzip/gzip.go b/internal/compress/gzip/gzip.go index f0ce6c82d94..8c13d8f7139 100644 --- a/internal/compress/gzip/gzip.go +++ b/internal/compress/gzip/gzip.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package gzip import ( diff --git a/internal/compress/gzip/gzip_mock.go b/internal/compress/gzip/gzip_mock.go index 7a3dd0cfc33..f92d3789dc7 100644 --- a/internal/compress/gzip/gzip_mock.go +++ b/internal/compress/gzip/gzip_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package gzip import "github.com/vdaas/vald/internal/io" diff --git a/internal/compress/lz4/lz4.go b/internal/compress/lz4/lz4.go index da78abb3db5..cc314cd95de 100644 --- a/internal/compress/lz4/lz4.go +++ b/internal/compress/lz4/lz4.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package lz4 import ( diff --git a/internal/compress/lz4/lz4_mock.go b/internal/compress/lz4/lz4_mock.go index 1b7c5a318ab..fb3fb68d2e3 100644 --- a/internal/compress/lz4/lz4_mock.go +++ b/internal/compress/lz4/lz4_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package lz4 import "github.com/vdaas/vald/internal/io" diff --git a/internal/compress/mock.go b/internal/compress/mock.go index 175dc317fcd..6898df1ca17 100644 --- a/internal/compress/mock.go +++ b/internal/compress/mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package compress import "github.com/vdaas/vald/internal/io" diff --git a/internal/compress/mock_test.go b/internal/compress/mock_test.go index cf6a2188caf..4369e9a68b9 100644 --- a/internal/compress/mock_test.go +++ b/internal/compress/mock_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package compress // NOT IMPLEMENTED BELOW diff --git a/internal/compress/zstd/option.go b/internal/compress/zstd/option.go index c29d168c777..860c5ddf5e1 100644 --- a/internal/compress/zstd/option.go +++ b/internal/compress/zstd/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package zstd import "github.com/klauspost/compress/zstd" diff --git a/internal/compress/zstd/zstd.go b/internal/compress/zstd/zstd.go index c815ef7eefa..428ebbee7cb 100644 --- a/internal/compress/zstd/zstd.go +++ b/internal/compress/zstd/zstd.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package zstd import ( diff --git a/internal/compress/zstd/zstd_mock.go b/internal/compress/zstd/zstd_mock.go index 60b2fcee0a5..6017d4ef632 100644 --- a/internal/compress/zstd/zstd_mock.go +++ b/internal/compress/zstd/zstd_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package zstd import ( diff --git a/internal/config/benchmark_test.go b/internal/config/benchmark_test.go index 5f6e8f0edbd..0218edf161d 100644 --- a/internal/config/benchmark_test.go +++ b/internal/config/benchmark_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/internal/config/circuitbreaker.go b/internal/config/circuitbreaker.go index 9af8adc18f3..7b58b718f99 100644 --- a/internal/config/circuitbreaker.go +++ b/internal/config/circuitbreaker.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // CircuitBreaker represents the configuration for the internal circuitbreaker package. diff --git a/internal/config/circuitbreaker_test.go b/internal/config/circuitbreaker_test.go index 75208e8683d..6d9ffc3feba 100644 --- a/internal/config/circuitbreaker_test.go +++ b/internal/config/circuitbreaker_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/internal/config/corrector_test.go b/internal/config/corrector_test.go index d5038985ce8..fd708a31aa4 100644 --- a/internal/config/corrector_test.go +++ b/internal/config/corrector_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/internal/config/faiss_test.go b/internal/config/faiss_test.go index f3230735fc8..bc6a08b088d 100644 --- a/internal/config/faiss_test.go +++ b/internal/config/faiss_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/internal/config/grpc.go b/internal/config/grpc.go index 8fc1379ab13..a8cee43dee8 100644 --- a/internal/config/grpc.go +++ b/internal/config/grpc.go @@ -272,8 +272,12 @@ func (g *GRPCClient) Opts() ([]grpc.Option, error) { if err != nil { return nil, err } + network := g.DialOption.Net.Network + if network == "" { + network = net.TCP.String() + } opts = append(opts, - grpc.WithDialer(der), + grpc.WithDialer(network, der), ) } diff --git a/internal/config/index_creation.go b/internal/config/index_creation.go index a4ff88ddd62..94de8ac2915 100644 --- a/internal/config/index_creation.go +++ b/internal/config/index_creation.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // IndexCreation represents the configurations for index creation. diff --git a/internal/config/index_creation_test.go b/internal/config/index_creation_test.go index dc3a31aa943..6db94c41369 100644 --- a/internal/config/index_creation_test.go +++ b/internal/config/index_creation_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/internal/config/index_deleter.go b/internal/config/index_deleter.go index 5b0fcf3b33f..5de4bc3a619 100644 --- a/internal/config/index_deleter.go +++ b/internal/config/index_deleter.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // IndexDeleter represents the configurations for index deletion. diff --git a/internal/config/index_operator.go b/internal/config/index_operator.go index 1b7d51aef17..7e7824800fe 100644 --- a/internal/config/index_operator.go +++ b/internal/config/index_operator.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config import "github.com/vdaas/vald/internal/k8s" diff --git a/internal/config/index_operator_test.go b/internal/config/index_operator_test.go index db13967f703..5ceffe475b5 100644 --- a/internal/config/index_operator_test.go +++ b/internal/config/index_operator_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/internal/config/index_save.go b/internal/config/index_save.go index 77b94c61081..bfc967441b0 100644 --- a/internal/config/index_save.go +++ b/internal/config/index_save.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // IndexSave represents the configurations for index save. diff --git a/internal/config/index_save_test.go b/internal/config/index_save_test.go index 75e24a7f0f2..3caf03fc83f 100644 --- a/internal/config/index_save_test.go +++ b/internal/config/index_save_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/internal/config/mirror.go b/internal/config/mirror.go index c545fd0cb8f..34b7fc9c803 100644 --- a/internal/config/mirror.go +++ b/internal/config/mirror.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // Mirror represents the Mirror Gateway configuration. diff --git a/internal/config/mirror_test.go b/internal/config/mirror_test.go index 438f193e581..b1810a794ad 100644 --- a/internal/config/mirror_test.go +++ b/internal/config/mirror_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/internal/config/net.go b/internal/config/net.go index b76bccc7af2..ad3b26610e0 100644 --- a/internal/config/net.go +++ b/internal/config/net.go @@ -25,6 +25,7 @@ import ( // Net represents the network configuration tcp, udp, unix domain socket. type Net struct { + Network string `json:"network,omitempty" yaml:"network"` DNS *DNS `json:"dns,omitempty" yaml:"dns"` Dialer *Dialer `json:"dialer,omitempty" yaml:"dialer"` SocketOption *SocketOption `json:"socket_option,omitempty" yaml:"socket_option"` @@ -117,6 +118,7 @@ func (s *SocketOption) ToSocketFlag() control.SocketFlag { // Bind binds the actual data from the Net fields. func (t *Net) Bind() *Net { + t.Network = GetActualValue(t.Network) if t.TLS != nil { t.TLS = t.TLS.Bind() } diff --git a/internal/config/readreplica_rotate.go b/internal/config/readreplica_rotate.go index ad4b6dcdc3a..2ae3cf10805 100644 --- a/internal/config/readreplica_rotate.go +++ b/internal/config/readreplica_rotate.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config type ReadReplicaRotate struct { diff --git a/internal/config/readreplica_rotate_test.go b/internal/config/readreplica_rotate_test.go index 147c779c942..0dfb73ee413 100644 --- a/internal/config/readreplica_rotate_test.go +++ b/internal/config/readreplica_rotate_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/internal/conv/conv.go b/internal/conv/conv.go index 0b287786820..ef0c443ba37 100644 --- a/internal/conv/conv.go +++ b/internal/conv/conv.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package conv import ( diff --git a/internal/conv/conv_bench_test.go b/internal/conv/conv_bench_test.go index a4365f6c2f9..d40beb96025 100644 --- a/internal/conv/conv_bench_test.go +++ b/internal/conv/conv_bench_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package conv import "testing" diff --git a/internal/conv/conv_test.go b/internal/conv/conv_test.go index e91812346be..ab314a1b554 100644 --- a/internal/conv/conv_test.go +++ b/internal/conv/conv_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package conv import ( diff --git a/internal/core/algorithm/usearch/option_test.go b/internal/core/algorithm/usearch/option_test.go index 26be929db96..4bea7b16057 100644 --- a/internal/core/algorithm/usearch/option_test.go +++ b/internal/core/algorithm/usearch/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usearch // NOT IMPLEMENTED BELOW diff --git a/internal/db/kvs/bbolt/bbolt.go b/internal/db/kvs/bbolt/bbolt.go index 6ff6c355864..7f4bd40c954 100644 --- a/internal/db/kvs/bbolt/bbolt.go +++ b/internal/db/kvs/bbolt/bbolt.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package bbolt import ( diff --git a/internal/db/kvs/bbolt/bbolt_test.go b/internal/db/kvs/bbolt/bbolt_test.go index ad29b96c1ac..e24965e53ea 100644 --- a/internal/db/kvs/bbolt/bbolt_test.go +++ b/internal/db/kvs/bbolt/bbolt_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package bbolt_test import ( diff --git a/internal/db/kvs/bbolt/option.go b/internal/db/kvs/bbolt/option.go index af8afff1126..e4bd50a14bc 100644 --- a/internal/db/kvs/bbolt/option.go +++ b/internal/db/kvs/bbolt/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package bbolt import ( diff --git a/internal/db/kvs/bbolt/option_test.go b/internal/db/kvs/bbolt/option_test.go index 102f4fbeb47..6c04ced0edd 100644 --- a/internal/db/kvs/bbolt/option_test.go +++ b/internal/db/kvs/bbolt/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package bbolt // NOT IMPLEMENTED BELOW diff --git a/internal/db/kvs/pogreb/options.go b/internal/db/kvs/pogreb/options.go index 9e476178c21..e85d8e0f75f 100644 --- a/internal/db/kvs/pogreb/options.go +++ b/internal/db/kvs/pogreb/options.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package pogreb import ( diff --git a/internal/db/kvs/pogreb/options_test.go b/internal/db/kvs/pogreb/options_test.go index 001e63bf235..328c80518ec 100644 --- a/internal/db/kvs/pogreb/options_test.go +++ b/internal/db/kvs/pogreb/options_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package pogreb import ( diff --git a/internal/db/kvs/pogreb/pogreb.go b/internal/db/kvs/pogreb/pogreb.go index 4cbdd80b7ee..3d5a21820d4 100644 --- a/internal/db/kvs/pogreb/pogreb.go +++ b/internal/db/kvs/pogreb/pogreb.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package pogreb import ( diff --git a/internal/db/kvs/pogreb/pogreb_test.go b/internal/db/kvs/pogreb/pogreb_test.go index a04d2ea906c..cc851d4f78b 100644 --- a/internal/db/kvs/pogreb/pogreb_test.go +++ b/internal/db/kvs/pogreb/pogreb_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package pogreb import ( diff --git a/internal/db/kvs/redis/redis_mock.go b/internal/db/kvs/redis/redis_mock.go index 588450dbbac..9a4ddb1eb3d 100644 --- a/internal/db/kvs/redis/redis_mock.go +++ b/internal/db/kvs/redis/redis_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package redis import ( diff --git a/internal/db/nosql/cassandra/cassandra_mock.go b/internal/db/nosql/cassandra/cassandra_mock.go index 79e00376506..8be14b4b5cc 100644 --- a/internal/db/nosql/cassandra/cassandra_mock.go +++ b/internal/db/nosql/cassandra/cassandra_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package cassandra import ( diff --git a/internal/db/storage/blob/cloudstorage/cloudstorage.go b/internal/db/storage/blob/cloudstorage/cloudstorage.go index c992fe51528..8671d5170d5 100644 --- a/internal/db/storage/blob/cloudstorage/cloudstorage.go +++ b/internal/db/storage/blob/cloudstorage/cloudstorage.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package cloudstorage import ( diff --git a/internal/db/storage/blob/cloudstorage/cloudstorage_test.go b/internal/db/storage/blob/cloudstorage/cloudstorage_test.go index 29467216865..49bb1332400 100644 --- a/internal/db/storage/blob/cloudstorage/cloudstorage_test.go +++ b/internal/db/storage/blob/cloudstorage/cloudstorage_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package cloudstorage // NOT IMPLEMENTED BELOW diff --git a/internal/db/storage/blob/cloudstorage/option.go b/internal/db/storage/blob/cloudstorage/option.go index 89561867e70..c345b54acfa 100644 --- a/internal/db/storage/blob/cloudstorage/option.go +++ b/internal/db/storage/blob/cloudstorage/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package cloudstorage import ( diff --git a/internal/db/storage/blob/cloudstorage/option_test.go b/internal/db/storage/blob/cloudstorage/option_test.go index 9bea2247372..1ee95dd48ce 100644 --- a/internal/db/storage/blob/cloudstorage/option_test.go +++ b/internal/db/storage/blob/cloudstorage/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package cloudstorage // NOT IMPLEMENTED BELOW diff --git a/internal/db/storage/blob/cloudstorage/urlopener/option.go b/internal/db/storage/blob/cloudstorage/urlopener/option.go index f58bd2d822b..e041d94c59c 100644 --- a/internal/db/storage/blob/cloudstorage/urlopener/option.go +++ b/internal/db/storage/blob/cloudstorage/urlopener/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package urlopener import "net/http" diff --git a/internal/db/storage/blob/cloudstorage/urlopener/option_test.go b/internal/db/storage/blob/cloudstorage/urlopener/option_test.go index a54fcf31d0c..0c8242e7463 100644 --- a/internal/db/storage/blob/cloudstorage/urlopener/option_test.go +++ b/internal/db/storage/blob/cloudstorage/urlopener/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package urlopener // NOT IMPLEMENTED BELOW diff --git a/internal/db/storage/blob/cloudstorage/urlopener/urlopener.go b/internal/db/storage/blob/cloudstorage/urlopener/urlopener.go index b13cfcd3aeb..b67b8db64b5 100644 --- a/internal/db/storage/blob/cloudstorage/urlopener/urlopener.go +++ b/internal/db/storage/blob/cloudstorage/urlopener/urlopener.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package urlopener import ( diff --git a/internal/db/storage/blob/cloudstorage/urlopener/urlopener_test.go b/internal/db/storage/blob/cloudstorage/urlopener/urlopener_test.go index 92d71a1111c..4275c3d153d 100644 --- a/internal/db/storage/blob/cloudstorage/urlopener/urlopener_test.go +++ b/internal/db/storage/blob/cloudstorage/urlopener/urlopener_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package urlopener // NOT IMPLEMENTED BELOW diff --git a/internal/db/storage/blob/s3/reader/io/io.go b/internal/db/storage/blob/s3/reader/io/io.go index b03da989a3d..a2ec0b021d3 100644 --- a/internal/db/storage/blob/s3/reader/io/io.go +++ b/internal/db/storage/blob/s3/reader/io/io.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package io import ( diff --git a/internal/db/storage/blob/s3/reader/io/io_test.go b/internal/db/storage/blob/s3/reader/io/io_test.go index 950e8bb34e6..f2e14554bf2 100644 --- a/internal/db/storage/blob/s3/reader/io/io_test.go +++ b/internal/db/storage/blob/s3/reader/io/io_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package io // NOT IMPLEMENTED BELOW diff --git a/internal/db/storage/blob/s3/sdk/s3/s3.go b/internal/db/storage/blob/s3/sdk/s3/s3.go index fea202bcf6e..20a1a67b6f8 100644 --- a/internal/db/storage/blob/s3/sdk/s3/s3.go +++ b/internal/db/storage/blob/s3/sdk/s3/s3.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package s3 import "github.com/aws/aws-sdk-go/service/s3" diff --git a/internal/db/storage/blob/s3/sdk/s3/s3iface/s3iface.go b/internal/db/storage/blob/s3/sdk/s3/s3iface/s3iface.go index 2fc464cab97..bf07df3b3b6 100644 --- a/internal/db/storage/blob/s3/sdk/s3/s3iface/s3iface.go +++ b/internal/db/storage/blob/s3/sdk/s3/s3iface/s3iface.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package s3iface import "github.com/aws/aws-sdk-go/service/s3/s3iface" diff --git a/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager.go b/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager.go index dcd145191cd..2d27cff1fa5 100644 --- a/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager.go +++ b/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package s3manager import ( diff --git a/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager_test.go b/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager_test.go index 180aec58c3a..4093b342fd5 100644 --- a/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager_test.go +++ b/internal/db/storage/blob/s3/sdk/s3/s3manager/s3manager_test.go @@ -1,14 +1,16 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package s3manager diff --git a/internal/db/storage/blob/s3/writer/writer_mock.go b/internal/db/storage/blob/s3/writer/writer_mock.go index b6b61f6749c..3d9d571464e 100644 --- a/internal/db/storage/blob/s3/writer/writer_mock.go +++ b/internal/db/storage/blob/s3/writer/writer_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package writer import ( diff --git a/internal/encoding/json/json_test.go b/internal/encoding/json/json_test.go index e7cebc7d534..94989478a9a 100644 --- a/internal/encoding/json/json_test.go +++ b/internal/encoding/json/json_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package json import ( diff --git a/internal/errors/circuitbreaker.go b/internal/errors/circuitbreaker.go index 0f2b7462f2d..e19d3fd9b61 100644 --- a/internal/errors/circuitbreaker.go +++ b/internal/errors/circuitbreaker.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors var ( diff --git a/internal/errors/circuitbreaker_test.go b/internal/errors/circuitbreaker_test.go index ab4ebba569b..b35f16628db 100644 --- a/internal/errors/circuitbreaker_test.go +++ b/internal/errors/circuitbreaker_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors // NOT IMPLEMENTED BELOW diff --git a/internal/errors/compressor_test.go b/internal/errors/compressor_test.go index 5eb9f85dd93..a2a93b39475 100644 --- a/internal/errors/compressor_test.go +++ b/internal/errors/compressor_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors import ( diff --git a/internal/errors/discoverer_test.go b/internal/errors/discoverer_test.go index de76513b0f1..d0d6d6a8091 100644 --- a/internal/errors/discoverer_test.go +++ b/internal/errors/discoverer_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors import "testing" diff --git a/internal/errors/errors_benchmark_test.go b/internal/errors/errors_benchmark_test.go index c5af30b93e6..6407f03cfaa 100644 --- a/internal/errors/errors_benchmark_test.go +++ b/internal/errors/errors_benchmark_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors import ( diff --git a/internal/errors/errors_test.go b/internal/errors/errors_test.go index 3e69498d237..c9e4cc09a27 100644 --- a/internal/errors/errors_test.go +++ b/internal/errors/errors_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors import ( diff --git a/internal/errors/faiss_test.go b/internal/errors/faiss_test.go index 319562e6909..c12fb5a94eb 100644 --- a/internal/errors/faiss_test.go +++ b/internal/errors/faiss_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors // NOT IMPLEMENTED BELOW diff --git a/internal/errors/file_test.go b/internal/errors/file_test.go index 0d14e62b86d..4dd630e0d17 100644 --- a/internal/errors/file_test.go +++ b/internal/errors/file_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors import "testing" diff --git a/internal/errors/grpc_test.go b/internal/errors/grpc_test.go index 72e061cbae0..e9a4e4047f9 100644 --- a/internal/errors/grpc_test.go +++ b/internal/errors/grpc_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors import ( diff --git a/internal/errors/http_test.go b/internal/errors/http_test.go index 52628913c85..ab6a5f644bb 100644 --- a/internal/errors/http_test.go +++ b/internal/errors/http_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors import ( diff --git a/internal/errors/info.go b/internal/errors/info.go index 136a247b1af..efc40716210 100644 --- a/internal/errors/info.go +++ b/internal/errors/info.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors var ( diff --git a/internal/errors/io_test.go b/internal/errors/io_test.go index b732d63d608..2c1acdf74bc 100644 --- a/internal/errors/io_test.go +++ b/internal/errors/io_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors import "testing" diff --git a/internal/errors/net.go b/internal/errors/net.go index 1a64fa9cf6f..f91599bdbe0 100644 --- a/internal/errors/net.go +++ b/internal/errors/net.go @@ -41,4 +41,10 @@ var ( ErrLookupIPAddrNotFound = func(host string) error { return Errorf("failed to lookup ip addrs for host: %s", host) } + + ErrInvalidAddress = func(network, addr string) error { + return Errorf("invalid address %s detected for network: %s", addr, network) + } + + ErrEmptyALPNs = New("empty ALPN protocols detected") ) diff --git a/internal/errors/net_test.go b/internal/errors/net_test.go index 3793dc89c38..93f587402db 100644 --- a/internal/errors/net_test.go +++ b/internal/errors/net_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors import ( diff --git a/internal/errors/observability_test.go b/internal/errors/observability_test.go index 361e0755b8a..c0fab9b2361 100644 --- a/internal/errors/observability_test.go +++ b/internal/errors/observability_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors import ( diff --git a/internal/errors/option.go b/internal/errors/option.go index 8b3bda142b3..9d7215fb97b 100644 --- a/internal/errors/option.go +++ b/internal/errors/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors // ErrInvalidOption represents the invalid option error. diff --git a/internal/errors/option_test.go b/internal/errors/option_test.go index f5c904bbdca..2408cf0eec0 100644 --- a/internal/errors/option_test.go +++ b/internal/errors/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors import ( diff --git a/internal/errors/runner_test.go b/internal/errors/runner_test.go index af62ebb3932..c3d5a9875d5 100644 --- a/internal/errors/runner_test.go +++ b/internal/errors/runner_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors import ( diff --git a/internal/errors/unit_test.go b/internal/errors/unit_test.go index 210800f347b..4f86e56406f 100644 --- a/internal/errors/unit_test.go +++ b/internal/errors/unit_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors import "testing" diff --git a/internal/errors/usearch_test.go b/internal/errors/usearch_test.go index 70a2325350e..f214df20847 100644 --- a/internal/errors/usearch_test.go +++ b/internal/errors/usearch_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors // NOT IMPLEMENTED BELOW diff --git a/internal/errors/vald_test.go b/internal/errors/vald_test.go index 9801de58025..6f705b2185b 100644 --- a/internal/errors/vald_test.go +++ b/internal/errors/vald_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package errors import "testing" diff --git a/internal/info/info_bench_test.go b/internal/info/info_bench_test.go index d91761c292e..09ba3649152 100644 --- a/internal/info/info_bench_test.go +++ b/internal/info/info_bench_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package info import "testing" diff --git a/internal/info/info_test.go b/internal/info/info_test.go index 41f4150860f..a78bc92b6f9 100644 --- a/internal/info/info_test.go +++ b/internal/info/info_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package info // NOT IMPLEMENTED BELOW diff --git a/internal/info/option.go b/internal/info/option.go index 8b89ee5bea3..bc1d7e687c8 100644 --- a/internal/info/option.go +++ b/internal/info/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package info import ( diff --git a/internal/info/option_test.go b/internal/info/option_test.go index 63c58e79b8d..61d9e650ccc 100644 --- a/internal/info/option_test.go +++ b/internal/info/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package info import ( diff --git a/internal/k8s/client/client_test.go b/internal/k8s/client/client_test.go index 20c2b43e9d6..641c9f4aa2b 100644 --- a/internal/k8s/client/client_test.go +++ b/internal/k8s/client/client_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package client // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/client/option_test.go b/internal/k8s/client/option_test.go index 8a61153abc2..4fb27090855 100644 --- a/internal/k8s/client/option_test.go +++ b/internal/k8s/client/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package client // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/job/job.go b/internal/k8s/job/job.go index bd295849694..2bb94d072df 100644 --- a/internal/k8s/job/job.go +++ b/internal/k8s/job/job.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package job import ( diff --git a/internal/k8s/job/job_test.go b/internal/k8s/job/job_test.go index 76842b0c20e..8beccbaf465 100644 --- a/internal/k8s/job/job_test.go +++ b/internal/k8s/job/job_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package job // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/job/option.go b/internal/k8s/job/option.go index 22df59d6be6..c42dc2d392e 100644 --- a/internal/k8s/job/option.go +++ b/internal/k8s/job/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package job import ( diff --git a/internal/k8s/job/option_test.go b/internal/k8s/job/option_test.go index 9be60f211bf..3ebd208abc1 100644 --- a/internal/k8s/job/option_test.go +++ b/internal/k8s/job/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package job // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/service/option_test.go b/internal/k8s/service/option_test.go index 7855f2d3089..f78e143460a 100644 --- a/internal/k8s/service/option_test.go +++ b/internal/k8s/service/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/service/service_test.go b/internal/k8s/service/service_test.go index e6e0a3d5b3c..a319ceeb095 100644 --- a/internal/k8s/service/service_test.go +++ b/internal/k8s/service/service_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/internal/k8s/v2/pod/option_test.go b/internal/k8s/v2/pod/option_test.go index fcebb618ccf..59434acc336 100644 --- a/internal/k8s/v2/pod/option_test.go +++ b/internal/k8s/v2/pod/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package pod // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/v2/pod/pod_test.go b/internal/k8s/v2/pod/pod_test.go index 7e4dcc3392f..2cae3c2d1bd 100644 --- a/internal/k8s/v2/pod/pod_test.go +++ b/internal/k8s/v2/pod/pod_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package pod // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/vald/benchmark/api/v1/job_types_test.go b/internal/k8s/vald/benchmark/api/v1/job_types_test.go index 8cbf2867cc6..387268229a8 100644 --- a/internal/k8s/vald/benchmark/api/v1/job_types_test.go +++ b/internal/k8s/vald/benchmark/api/v1/job_types_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package v1 // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/vald/benchmark/api/v1/scenario_types_test.go b/internal/k8s/vald/benchmark/api/v1/scenario_types_test.go index 95c6f276dd6..266db15901e 100644 --- a/internal/k8s/vald/benchmark/api/v1/scenario_types_test.go +++ b/internal/k8s/vald/benchmark/api/v1/scenario_types_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package v1 // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/vald/benchmark/job/job_template_option_test.go b/internal/k8s/vald/benchmark/job/job_template_option_test.go index 629fd525e95..2f70e5cb1c1 100644 --- a/internal/k8s/vald/benchmark/job/job_template_option_test.go +++ b/internal/k8s/vald/benchmark/job/job_template_option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package job // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/vald/benchmark/job/job_template_test.go b/internal/k8s/vald/benchmark/job/job_template_test.go index 73108136a28..0f4c2fed088 100644 --- a/internal/k8s/vald/benchmark/job/job_template_test.go +++ b/internal/k8s/vald/benchmark/job/job_template_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package job // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/vald/benchmark/job/job_test.go b/internal/k8s/vald/benchmark/job/job_test.go index 52787d40de9..f9bc90835d2 100644 --- a/internal/k8s/vald/benchmark/job/job_test.go +++ b/internal/k8s/vald/benchmark/job/job_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package job // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/vald/benchmark/job/option_test.go b/internal/k8s/vald/benchmark/job/option_test.go index d478ec48321..d4706ccee92 100644 --- a/internal/k8s/vald/benchmark/job/option_test.go +++ b/internal/k8s/vald/benchmark/job/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package job // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/vald/benchmark/scenario/option_test.go b/internal/k8s/vald/benchmark/scenario/option_test.go index 67d86537833..f2733168b06 100644 --- a/internal/k8s/vald/benchmark/scenario/option_test.go +++ b/internal/k8s/vald/benchmark/scenario/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package scenario // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/vald/benchmark/scenario/scenario_test.go b/internal/k8s/vald/benchmark/scenario/scenario_test.go index 328251e3576..43720880c79 100644 --- a/internal/k8s/vald/benchmark/scenario/scenario_test.go +++ b/internal/k8s/vald/benchmark/scenario/scenario_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package scenario // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/vald/mirror/api/v1/target_types.go b/internal/k8s/vald/mirror/api/v1/target_types.go index 0263e5ad267..999abbca446 100644 --- a/internal/k8s/vald/mirror/api/v1/target_types.go +++ b/internal/k8s/vald/mirror/api/v1/target_types.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package v1 import ( diff --git a/internal/k8s/vald/mirror/api/v1/target_types_test.go b/internal/k8s/vald/mirror/api/v1/target_types_test.go index 1cd7656e294..8ac29093c75 100644 --- a/internal/k8s/vald/mirror/api/v1/target_types_test.go +++ b/internal/k8s/vald/mirror/api/v1/target_types_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package v1 // NOT IMPLEMENTED BELOW diff --git a/internal/k8s/vald/mirror/target/option.go b/internal/k8s/vald/mirror/target/option.go index cbf3829d5d7..717fe9bb614 100644 --- a/internal/k8s/vald/mirror/target/option.go +++ b/internal/k8s/vald/mirror/target/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package target import ( diff --git a/internal/k8s/vald/mirror/target/target.go b/internal/k8s/vald/mirror/target/target.go index aeba23c73e3..08ca7382e4c 100644 --- a/internal/k8s/vald/mirror/target/target.go +++ b/internal/k8s/vald/mirror/target/target.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package target import ( diff --git a/internal/k8s/vald/mirror/target/target_template.go b/internal/k8s/vald/mirror/target/target_template.go index e037aea8d90..af80998d694 100644 --- a/internal/k8s/vald/mirror/target/target_template.go +++ b/internal/k8s/vald/mirror/target/target_template.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package target import ( diff --git a/internal/k8s/vald/mirror/target/target_template_option.go b/internal/k8s/vald/mirror/target/target_template_option.go index 2a7f68a8cbf..2d69121fb98 100644 --- a/internal/k8s/vald/mirror/target/target_template_option.go +++ b/internal/k8s/vald/mirror/target/target_template_option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package target import "github.com/vdaas/vald/internal/errors" diff --git a/internal/log/format/format_test.go b/internal/log/format/format_test.go index d4abcf28e93..8f3b184c034 100644 --- a/internal/log/format/format_test.go +++ b/internal/log/format/format_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package format import ( diff --git a/internal/log/glg/glg_test.go b/internal/log/glg/glg_test.go index dfe07a2a990..5a10f672172 100644 --- a/internal/log/glg/glg_test.go +++ b/internal/log/glg/glg_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package glg import ( diff --git a/internal/log/glg/option_test.go b/internal/log/glg/option_test.go index 4b960f7c5f9..a93101c5c95 100644 --- a/internal/log/glg/option_test.go +++ b/internal/log/glg/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package glg import ( diff --git a/internal/log/level/level_test.go b/internal/log/level/level_test.go index f8a91993150..9c242788d85 100644 --- a/internal/log/level/level_test.go +++ b/internal/log/level/level_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package level import ( diff --git a/internal/log/mock/logger.go b/internal/log/mock/logger.go index 2d205461abe..350184b96cc 100644 --- a/internal/log/mock/logger.go +++ b/internal/log/mock/logger.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package mock // Logger represents struct of each log level function. diff --git a/internal/log/mock/logger_test.go b/internal/log/mock/logger_test.go index e09ad01af73..8ec58e352c9 100644 --- a/internal/log/mock/logger_test.go +++ b/internal/log/mock/logger_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package mock import ( diff --git a/internal/log/mock/retry.go b/internal/log/mock/retry.go index edc39ce74d1..a03a263d7bb 100644 --- a/internal/log/mock/retry.go +++ b/internal/log/mock/retry.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package mock // Retry represents struct of mock retry structure. diff --git a/internal/log/mock/retry_test.go b/internal/log/mock/retry_test.go index fed2b59adf7..95f158ea707 100644 --- a/internal/log/mock/retry_test.go +++ b/internal/log/mock/retry_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package mock import ( diff --git a/internal/log/nop/nop.go b/internal/log/nop/nop.go index c9fa659ca36..c70e8fb8a3f 100644 --- a/internal/log/nop/nop.go +++ b/internal/log/nop/nop.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package nop import "github.com/vdaas/vald/internal/log/logger" diff --git a/internal/log/nop/nop_test.go b/internal/log/nop/nop_test.go index e731e8ea093..424060e8409 100644 --- a/internal/log/nop/nop_test.go +++ b/internal/log/nop/nop_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package nop import ( diff --git a/internal/log/option.go b/internal/log/option.go index 71efb017222..19b6336a479 100644 --- a/internal/log/option.go +++ b/internal/log/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package log import ( diff --git a/internal/log/option_test.go b/internal/log/option_test.go index 64a9ebecf3c..b796be4e018 100644 --- a/internal/log/option_test.go +++ b/internal/log/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package log import ( diff --git a/internal/log/retry/option.go b/internal/log/retry/option.go index d90d2c70189..46afee87394 100644 --- a/internal/log/retry/option.go +++ b/internal/log/retry/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package retry type Option func(r *retry) diff --git a/internal/log/retry/option_test.go b/internal/log/retry/option_test.go index 004e860442a..33555a5451b 100644 --- a/internal/log/retry/option_test.go +++ b/internal/log/retry/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package retry import ( diff --git a/internal/log/retry/retry.go b/internal/log/retry/retry.go index fdc0db96981..4763469174a 100644 --- a/internal/log/retry/retry.go +++ b/internal/log/retry/retry.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package retry import ( diff --git a/internal/log/retry/retry_test.go b/internal/log/retry/retry_test.go index d8c9d8432d5..f8ef9a0f773 100644 --- a/internal/log/retry/retry_test.go +++ b/internal/log/retry/retry_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package retry import ( diff --git a/internal/log/zap/option.go b/internal/log/zap/option.go index bfccc92345a..b5b9d56fae1 100644 --- a/internal/log/zap/option.go +++ b/internal/log/zap/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package zap import ( diff --git a/internal/log/zap/option_test.go b/internal/log/zap/option_test.go index 8c86239223e..43f453df523 100644 --- a/internal/log/zap/option_test.go +++ b/internal/log/zap/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package zap import ( diff --git a/internal/log/zap/zap.go b/internal/log/zap/zap.go index 615499b869f..939c4458724 100644 --- a/internal/log/zap/zap.go +++ b/internal/log/zap/zap.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package zap import ( diff --git a/internal/log/zap/zap_test.go b/internal/log/zap/zap_test.go index 35e2fbb67cb..c958b70911f 100644 --- a/internal/log/zap/zap_test.go +++ b/internal/log/zap/zap_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package zap import ( diff --git a/internal/net/dialer.go b/internal/net/dialer.go index d7159bb40d2..792aadb5859 100644 --- a/internal/net/dialer.go +++ b/internal/net/dialer.go @@ -30,6 +30,7 @@ import ( "github.com/vdaas/vald/internal/errors" "github.com/vdaas/vald/internal/log" "github.com/vdaas/vald/internal/net/control" + "github.com/vdaas/vald/internal/net/quic" "github.com/vdaas/vald/internal/observability/trace" "github.com/vdaas/vald/internal/safety" "github.com/vdaas/vald/internal/sync" @@ -123,7 +124,7 @@ func NewDialer(opts ...DialerOption) (der Dialer, err error) { if d.dnsCache, err = cache.New( cache.WithExpireDuration[*dialerCache](d.dnsCacheExpirationStr), cache.WithExpireCheckDuration[*dialerCache](d.dnsRefreshDurationStr), - cache.WithExpiredHook[*dialerCache](d.cacheExpireHook), + cache.WithExpiredHook(d.cacheExpireHook), ); err != nil { return nil, err } @@ -310,6 +311,17 @@ func (d *dialer) cachedDialer(ctx context.Context, network, addr string) (conn C return d.dial(ctx, network, addr) } +func isQUICDial(network, addr string) bool { + if !IsUDP(network) { + return false + } + host, port, err := SplitHostPort(addr) + if err != nil || host == "" || port == 0 { + return false + } + return port != 53 +} + func (d *dialer) dial(ctx context.Context, network, addr string) (conn Conn, err error) { ctx, span := trace.StartSpan(ctx, apiName+"/Dialer.dial") defer func() { @@ -317,26 +329,33 @@ func (d *dialer) dial(ctx context.Context, network, addr string) (conn Conn, err span.End() } }() + if NetworkTypeFromString(network) == Unknown { + network = TCP.String() + } + if addr == "" { + return nil, errors.ErrInvalidAddress(network, addr) + } log.Debugf("%s connection dialing to addr %s", network, addr) - err = safety.RecoverWithoutPanicFunc(func() error { - conn, err = d.der.DialContext(ctx, network, addr) + err = safety.RecoverWithoutPanicFunc(func() (err error) { + if isQUICDial(network, addr) { + conn, err = quic.DialContext(ctx, addr, d.tlsConfig) + } else { + if IsUDP(network) { + network = TCP.String() + } + conn, err = d.der.DialContext(ctx, network, addr) + } return err })() if err != nil { - defer func(conn Conn) { - if conn != nil { - if err != nil { - err = errors.Join(conn.Close(), err) - return - } - err = conn.Close() - } - }(conn) + if conn != nil { + err = errors.Join(conn.Close(), err) + } return nil, err } d.tmu.RLock() - if d.tlsConfig != nil { + if !IsUDP(network) && d.tlsConfig != nil { d.tmu.RUnlock() return d.tlsHandshake(ctx, conn, network, addr) } @@ -423,15 +442,12 @@ func (d *dialer) tlsHandshake( })() } if err != nil || conn == nil { - defer func(conn Conn) { - if conn != nil { - if err != nil { - err = errors.Join(conn.Close(), err) - return - } - err = conn.Close() + if conn != nil { + if err != nil { + return nil, errors.Join(conn.Close(), err) } - }(conn) + return nil, conn.Close() + } return nil, err } tconn, ok := conn.(*tls.Conn) @@ -454,11 +470,15 @@ func (d *dialer) tlsHandshake( return tconn, nil } -func (d *dialer) cacheExpireHook(ctx context.Context, addr string, _ *dialerCache) { +func (d *dialer) cacheExpireHook(ctx context.Context, addr string, dc *dialerCache) { if err := safety.RecoverFunc(func() (err error) { _, err = d.lookup(ctx, addr) return })(); err != nil { - log.Errorf("dns cache expiration hook process returned error: %v\tfor addr:\t%s", err, addr) + if dc != nil { + log.Errorf("dns cache expiration hook process returned error: %v\tfor addr:\t%s\tips: %v\tlen: %d", err, addr, dc.ips, dc.Len()) + } else { + log.Errorf("dns cache expiration hook process returned error: %v\tfor addr:\t%s", err, addr) + } } } diff --git a/internal/net/dialer_test.go b/internal/net/dialer_test.go index 9c6261aa0cc..ba92251178d 100644 --- a/internal/net/dialer_test.go +++ b/internal/net/dialer_test.go @@ -1425,7 +1425,7 @@ func Test_dialer_dial(t *testing.T) { return nil }, want: want{ - err: errors.New("missing address"), + err: errors.ErrInvalidAddress(TCP.String(), ""), }, }, { @@ -1452,7 +1452,7 @@ func Test_dialer_dial(t *testing.T) { return nil }, want: want{ - err: net.UnknownNetworkError("invalid"), + err: errors.ErrInvalidAddress(TCP.String(), ""), }, }, { @@ -1477,7 +1477,7 @@ func Test_dialer_dial(t *testing.T) { return nil }, want: want{ - err: net.UnknownNetworkError(""), + err: errors.ErrInvalidAddress(TCP.String(), ""), }, }, } diff --git a/internal/net/grpc/codes/codes_test.go b/internal/net/grpc/codes/codes_test.go index a478c491274..a651ed5a297 100644 --- a/internal/net/grpc/codes/codes_test.go +++ b/internal/net/grpc/codes/codes_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package codes // NOT IMPLEMENTED BELOW diff --git a/internal/net/grpc/context.go b/internal/net/grpc/context.go index 5ca9c3508e7..3cfebf71243 100644 --- a/internal/net/grpc/context.go +++ b/internal/net/grpc/context.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/internal/net/grpc/context_test.go b/internal/net/grpc/context_test.go index 003d7e305dd..6437037d40a 100644 --- a/internal/net/grpc/context_test.go +++ b/internal/net/grpc/context_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/internal/net/grpc/interceptor/client/metric/metric_test.go b/internal/net/grpc/interceptor/client/metric/metric_test.go index 0090bc8e2ef..45d7ac35960 100644 --- a/internal/net/grpc/interceptor/client/metric/metric_test.go +++ b/internal/net/grpc/interceptor/client/metric/metric_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package metric // NOT IMPLEMENTED BELOW diff --git a/internal/net/grpc/interceptor/client/trace/trace.go b/internal/net/grpc/interceptor/client/trace/trace.go index baa4f81b31c..7174c3d773b 100644 --- a/internal/net/grpc/interceptor/client/trace/trace.go +++ b/internal/net/grpc/interceptor/client/trace/trace.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package trace import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" diff --git a/internal/net/grpc/interceptor/server/metric/metric.go b/internal/net/grpc/interceptor/server/metric/metric.go index d0bba7e075e..345e57ea363 100644 --- a/internal/net/grpc/interceptor/server/metric/metric.go +++ b/internal/net/grpc/interceptor/server/metric/metric.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package metric import ( diff --git a/internal/net/grpc/interceptor/server/metric/metric_test.go b/internal/net/grpc/interceptor/server/metric/metric_test.go index 7de9baa1a8b..c60d2ba8da3 100644 --- a/internal/net/grpc/interceptor/server/metric/metric_test.go +++ b/internal/net/grpc/interceptor/server/metric/metric_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package metric import ( diff --git a/internal/net/grpc/interceptor/server/trace/trace.go b/internal/net/grpc/interceptor/server/trace/trace.go index 0f061f92380..e4aa4e4c9d0 100644 --- a/internal/net/grpc/interceptor/server/trace/trace.go +++ b/internal/net/grpc/interceptor/server/trace/trace.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package trace import ( diff --git a/internal/net/grpc/interceptor/server/trace/trace_test.go b/internal/net/grpc/interceptor/server/trace/trace_test.go index 023ee2e5301..c3a6466b06c 100644 --- a/internal/net/grpc/interceptor/server/trace/trace_test.go +++ b/internal/net/grpc/interceptor/server/trace/trace_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package trace // NOT IMPLEMENTED BELOW diff --git a/internal/net/grpc/logger/logger.go b/internal/net/grpc/logger/logger.go index 064b544a54d..2fcb374f175 100644 --- a/internal/net/grpc/logger/logger.go +++ b/internal/net/grpc/logger/logger.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package logger import ( diff --git a/internal/net/grpc/logger/logger_test.go b/internal/net/grpc/logger/logger_test.go index 5d615d1e71a..1f39efe45c1 100644 --- a/internal/net/grpc/logger/logger_test.go +++ b/internal/net/grpc/logger/logger_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package logger import ( diff --git a/internal/net/grpc/metadata_test.go b/internal/net/grpc/metadata_test.go index 193e2e3994c..69c9230a06f 100644 --- a/internal/net/grpc/metadata_test.go +++ b/internal/net/grpc/metadata_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/internal/net/grpc/option.go b/internal/net/grpc/option.go index 79a9e50131c..26dee5da124 100644 --- a/internal/net/grpc/option.go +++ b/internal/net/grpc/option.go @@ -485,18 +485,26 @@ func WithKeepaliveParams(t, to string, permitWithoutStream bool) Option { } } -func WithDialer(der net.Dialer) Option { +func WithDialer(network string, der net.Dialer) Option { return func(g *gRPCClient) { if der != nil { g.dialer = der if g.dopts == nil && cap(g.dopts) == 0 { g.dopts = make([]grpc.DialOption, 0, defaultDialOptionLength) } + nt := net.NetworkTypeFromString(network) + switch nt { + case net.UDP, net.UDP4, net.UDP6: + nt = net.UDP + case net.UNIX, net.UNIXGRAM, net.UNIXPACKET: + nt = net.UNIX + default: + nt = net.TCP + } g.dopts = append(g.dopts, grpc.WithContextDialer(func(ctx context.Context, addr string) (net.Conn, error) { - // TODO we need change network type dynamically - log.Debugf("gRPC context Dialer addr is %s", addr) - return der.GetDialer()(ctx, net.TCP.String(), addr) + log.Debugf("gRPC context Dialer for network %s, addr is %s", nt.String(), addr) + return g.dialer.GetDialer()(ctx, nt.String(), addr) }), ) } diff --git a/internal/net/grpc/pool/pool_test.go b/internal/net/grpc/pool/pool_test.go index 8335f58fad4..399732c829c 100644 --- a/internal/net/grpc/pool/pool_test.go +++ b/internal/net/grpc/pool/pool_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package pool // NOT IMPLEMENTED BELOW diff --git a/internal/net/http/dump/dump_test.go b/internal/net/http/dump/dump_test.go index 4e535713e0c..86b8abe0cf1 100644 --- a/internal/net/http/dump/dump_test.go +++ b/internal/net/http/dump/dump_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package dump import ( diff --git a/internal/net/http/json/json_test.go b/internal/net/http/json/json_test.go index d12189dcf9d..45015a64b5e 100644 --- a/internal/net/http/json/json_test.go +++ b/internal/net/http/json/json_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package json import ( diff --git a/internal/net/http/metrics/pprof_test.go b/internal/net/http/metrics/pprof_test.go index c0118ac8ed4..85c762b1681 100644 --- a/internal/net/http/metrics/pprof_test.go +++ b/internal/net/http/metrics/pprof_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package metrics import ( diff --git a/internal/net/http/middleware/middleware_test.go b/internal/net/http/middleware/middleware_test.go index 0b4daea2b5e..f23c657e8bf 100644 --- a/internal/net/http/middleware/middleware_test.go +++ b/internal/net/http/middleware/middleware_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package middleware import ( diff --git a/internal/net/http/middleware/option_test.go b/internal/net/http/middleware/option_test.go index 7df6edaab32..c7f4388b887 100644 --- a/internal/net/http/middleware/option_test.go +++ b/internal/net/http/middleware/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package middleware import ( diff --git a/internal/net/http/middleware/timeout_test.go b/internal/net/http/middleware/timeout_test.go index 6dfa309656d..f7bc0479662 100644 --- a/internal/net/http/middleware/timeout_test.go +++ b/internal/net/http/middleware/timeout_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package middleware import ( diff --git a/internal/net/http/rest/rest_test.go b/internal/net/http/rest/rest_test.go index 51282cd9f04..fec5a041e4a 100644 --- a/internal/net/http/rest/rest_test.go +++ b/internal/net/http/rest/rest_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest import ( diff --git a/internal/net/http/routing/middleware_mock.go b/internal/net/http/routing/middleware_mock.go index d50786a58ae..76103fafda9 100644 --- a/internal/net/http/routing/middleware_mock.go +++ b/internal/net/http/routing/middleware_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package routing import "github.com/vdaas/vald/internal/net/http/rest" diff --git a/internal/net/http/routing/option_test.go b/internal/net/http/routing/option_test.go index 4ad6c133803..fbee7c74a83 100644 --- a/internal/net/http/routing/option_test.go +++ b/internal/net/http/routing/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package routing import ( diff --git a/internal/net/http/routing/router_test.go b/internal/net/http/routing/router_test.go index 05595fe4894..8ba972f9fde 100644 --- a/internal/net/http/routing/router_test.go +++ b/internal/net/http/routing/router_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package routing import ( diff --git a/internal/net/http/transport/roundtrip_mock.go b/internal/net/http/transport/roundtrip_mock.go index 82b49bfe2b7..6058a96c0bb 100644 --- a/internal/net/http/transport/roundtrip_mock.go +++ b/internal/net/http/transport/roundtrip_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package transport import ( diff --git a/internal/net/net.go b/internal/net/net.go index 8f87a858613..56d3fcf3524 100644 --- a/internal/net/net.go +++ b/internal/net/net.go @@ -34,6 +34,9 @@ import ( ) type ( + // Addr is an alias of net.Addr. + Addr = net.Addr + // Conn is an alias of net.Conn. Conn = net.Conn @@ -46,6 +49,15 @@ type ( // Resolver is an alias of net.Resolver. Resolver = net.Resolver + // UDPConn is an alias of net.UDPConn. + UDPConn = net.UDPConn + + // TCPListener is an alias of net.TCPListener. + TCPListener = net.TCPListener + + // UnixListener is an alias of net.UnixListener. + UnixListener = net.UnixListener + // NetworkType represents a network type such as TCP, TCP6, etc. NetworkType uint ) @@ -84,6 +96,9 @@ var ( // NetworkTypeFromString returns the corresponding network type from string. func NetworkTypeFromString(str string) NetworkType { + if str == "" { + return Unknown + } switch strings.ToLower(str) { case UNIX.String(): return UNIX @@ -151,6 +166,22 @@ func IsLocal(host string) bool { host == localIPv6 } +// IsUDP returns if the network type is the udp or udp4 or udp6. +func IsUDP(network string) bool { + rip := NetworkTypeFromString(network) + return rip == UDP || + rip == UDP4 || + rip == UDP6 +} + +// IsTCP returns if the network type is the tcp or tcp4 or tcp6. +func IsTCP(network string) bool { + rip := NetworkTypeFromString(network) + return rip == TCP || + rip == TCP4 || + rip == TCP6 +} + // Parse parses the hostname, IPv4 or IPv6 address and return the hostname/IP, port number, // whether the address is local IP and IPv4 or IPv6, and any parsing error occurred. // The address should contains the port number, otherwise an error will return. diff --git a/internal/net/net_test.go b/internal/net/net_test.go index 1c055fa0a85..1b0bbd6249e 100644 --- a/internal/net/net_test.go +++ b/internal/net/net_test.go @@ -262,7 +262,7 @@ func TestParse(t *testing.T) { return errors.Errorf("host got: \"%#v\",\n\t\t\t\twant: \"%#v\"", gotHost, w.wantHost) } if !reflect.DeepEqual(gotPort, w.wantPort) { - return errors.Errorf("port got: \"%#v\",\n\t\t\t\twant: \"%#v\"", gotPort, w.wantPort) + return errors.Errorf("port got: \"%d\",\n\t\t\t\twant: \"%d\"", gotPort, w.wantPort) } if !reflect.DeepEqual(gotIsLocal, w.isLocal) { return errors.Errorf("isLocal got: \"%#v\",\n\t\t\t\twant: \"%#v\"", gotIsLocal, w.isLocal) diff --git a/internal/net/quic/conn.go b/internal/net/quic/conn.go new file mode 100644 index 00000000000..2efbd533449 --- /dev/null +++ b/internal/net/quic/conn.go @@ -0,0 +1,172 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +package quic + +import ( + "context" + "net" + + quic "github.com/quic-go/quic-go" + "github.com/vdaas/vald/internal/errors" + "github.com/vdaas/vald/internal/sync" + "github.com/vdaas/vald/internal/tls" +) + +type Conn struct { + quic.Connection + quic.Stream +} + +type qconn struct { + connectionCache sync.Map[string, quic.Connection] +} + +var defaultQconn = new(qconn) + +func NewConn(ctx context.Context, conn quic.Connection) (net.Conn, error) { + stream, err := conn.OpenStreamSync(ctx) + if err != nil { + return nil, err + } + return &Conn{ + Connection: conn, + Stream: stream, + }, nil +} + +func (c *Conn) Close() (err error) { + return c.Stream.Close() +} + +func DialContext(ctx context.Context, addr string, tcfg *tls.Config) (net.Conn, error) { + if tcfg == nil { + return nil, errors.ErrCertificationFailed + } + if len(tcfg.NextProtos) == 0 { + return nil, errors.ErrEmptyALPNs + } + return defaultQconn.dialQuicContext(ctx, addr, tcfg) +} + +func (q *qconn) dialQuicContext( + ctx context.Context, addr string, tcfg *tls.Config, +) (net.Conn, error) { + si, ok := q.connectionCache.Load(addr) + if ok { + if conn, ok := si.(quic.Connection); ok { + return NewConn(ctx, conn) + } + } + conn, err := quic.DialAddr(ctx, addr, tcfg, &quic.Config{ + /* + // GetConfigForClient is called for incoming connections. + // If the error is not nil, the connection attempt is refused. + GetConfigForClient func(info *ClientHelloInfo) (*Config, error) + // The QUIC versions that can be negotiated. + // If not set, it uses all versions available. + Versions []Version + // HandshakeIdleTimeout is the idle timeout before completion of the handshake. + // If we don't receive any packet from the peer within this time, the connection attempt is aborted. + // Additionally, if the handshake doesn't complete in twice this time, the connection attempt is also aborted. + // If this value is zero, the timeout is set to 5 seconds. + HandshakeIdleTimeout time.Duration + // MaxIdleTimeout is the maximum duration that may pass without any incoming network activity. + // The actual value for the idle timeout is the minimum of this value and the peer's. + // This value only applies after the handshake has completed. + // If the timeout is exceeded, the connection is closed. + // If this value is zero, the timeout is set to 30 seconds. + MaxIdleTimeout time.Duration + // The TokenStore stores tokens received from the server. + // Tokens are used to skip address validation on future connection attempts. + // The key used to store tokens is the ServerName from the tls.Config, if set + // otherwise the token is associated with the server's IP address. + TokenStore TokenStore + // InitialStreamReceiveWindow is the initial size of the stream-level flow control window for receiving data. + // If the application is consuming data quickly enough, the flow control auto-tuning algorithm + // will increase the window up to MaxStreamReceiveWindow. + // If this value is zero, it will default to 512 KB. + // Values larger than the maximum varint (quicvarint.Max) will be clipped to that value. + InitialStreamReceiveWindow uint64 + // MaxStreamReceiveWindow is the maximum stream-level flow control window for receiving data. + // If this value is zero, it will default to 6 MB. + // Values larger than the maximum varint (quicvarint.Max) will be clipped to that value. + MaxStreamReceiveWindow uint64 + // InitialConnectionReceiveWindow is the initial size of the stream-level flow control window for receiving data. + // If the application is consuming data quickly enough, the flow control auto-tuning algorithm + // will increase the window up to MaxConnectionReceiveWindow. + // If this value is zero, it will default to 512 KB. + // Values larger than the maximum varint (quicvarint.Max) will be clipped to that value. + InitialConnectionReceiveWindow uint64 + // MaxConnectionReceiveWindow is the connection-level flow control window for receiving data. + // If this value is zero, it will default to 15 MB. + // Values larger than the maximum varint (quicvarint.Max) will be clipped to that value. + MaxConnectionReceiveWindow uint64 + // AllowConnectionWindowIncrease is called every time the connection flow controller attempts + // to increase the connection flow control window. + // If set, the caller can prevent an increase of the window. Typically, it would do so to + // limit the memory usage. + // To avoid deadlocks, it is not valid to call other functions on the connection or on streams + // in this callback. + AllowConnectionWindowIncrease func(conn Connection, delta uint64) bool + // MaxIncomingStreams is the maximum number of concurrent bidirectional streams that a peer is allowed to open. + // If not set, it will default to 100. + // If set to a negative value, it doesn't allow any bidirectional streams. + // Values larger than 2^60 will be clipped to that value. + MaxIncomingStreams int64 + // MaxIncomingUniStreams is the maximum number of concurrent unidirectional streams that a peer is allowed to open. + // If not set, it will default to 100. + // If set to a negative value, it doesn't allow any unidirectional streams. + // Values larger than 2^60 will be clipped to that value. + MaxIncomingUniStreams int64 + // KeepAlivePeriod defines whether this peer will periodically send a packet to keep the connection alive. + // If set to 0, then no keep alive is sent. Otherwise, the keep alive is sent on that period (or at most + // every half of MaxIdleTimeout, whichever is smaller). + KeepAlivePeriod time.Duration + // InitialPacketSize is the initial size of packets sent. + // It is usually not necessary to manually set this value, + // since Path MTU discovery very quickly finds the path's MTU. + // If set too high, the path might not support packets that large, leading to a timeout of the QUIC handshake. + // Values below 1200 are invalid. + InitialPacketSize uint16 + // DisablePathMTUDiscovery disables Path MTU Discovery (RFC 8899). + // This allows the sending of QUIC packets that fully utilize the available MTU of the path. + // Path MTU discovery is only available on systems that allow setting of the Don't Fragment (DF) bit. + DisablePathMTUDiscovery bool + // Allow0RTT allows the application to decide if a 0-RTT connection attempt should be accepted. + // Only valid for the server. + Allow0RTT bool + // Enable QUIC datagram support (RFC 9221). + EnableDatagrams bool + Tracer func(context.Context, logging.Perspective, ConnectionID) *logging.ConnectionTracer + */ + }) + if err != nil { + return nil, err + } + q.connectionCache.Store(addr, conn) + return NewConn(ctx, conn) +} + +func (q *qconn) Close() (err error) { + q.connectionCache.Range(func(addr string, conn quic.Connection) bool { + e := conn.CloseWithError(0, addr) + if e != nil { + err = errors.Wrap(err, e.Error()) + } + return true + }) + return nil +} diff --git a/internal/net/quic/listener.go b/internal/net/quic/listener.go new file mode 100644 index 00000000000..c3b15221d20 --- /dev/null +++ b/internal/net/quic/listener.go @@ -0,0 +1,84 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +package quic + +import ( + "context" + "net" + + quic "github.com/quic-go/quic-go" + "github.com/vdaas/vald/internal/errors" + "github.com/vdaas/vald/internal/io" + "github.com/vdaas/vald/internal/tls" +) + +type Listener struct { + quic.Listener + + ctx context.Context +} + +func Listen(ctx context.Context, addr string, tcfg *tls.Config) (net.Listener, error) { + ql, err := quic.ListenAddr(addr, tcfg, &quic.Config{ + // Versions: nil, + // ConnectionIDLength: 0, + // HandshakeIdleTimeout: 0, + // MaxIdleTimeout: 0, + // AcceptToken: func(clientAddr net.Addr, token *quic.Token) bool { + // return true + // }, + // TokenStore: quic.NewLRUTokenStore(clientAddr), + // InitialStreamReceiveWindow: 0, + // InitialConnectionReceiveWindow: 0, + // MaxStreamReceiveWindow: 0, + // MaxConnectionReceiveWindow: 0, + // MaxIncomingStreams: 0, + // MaxIncomingUniStreams: 0, + // StatelessResetKey: nil, + // KeepAlive: true, + // DisablePathMTUDiscovery: false, + EnableDatagrams: true, + // Tracer: logging.NewMultiplexedTracer(), + }) + if err != nil { + return nil, err + } + return &Listener{ + Listener: *ql, + ctx: ctx, + }, nil +} + +func (l *Listener) Accept() (net.Conn, error) { + sess, err := l.Listener.Accept(l.ctx) + if err != nil { + return nil, err + } + + stream, err := sess.AcceptStream(l.ctx) + if err != nil { + if errors.Is(err, io.EOF) { + // The session was closed gracefully by the peer + return nil, err + } + _ = sess.CloseWithError(0, "failed to accept stream") + return nil, err + } + return &Conn{ + Connection: sess, + Stream: stream, + }, nil +} diff --git a/internal/observability/attribute/attribute.go b/internal/observability/attribute/attribute.go index 3a67f83c4b1..21b2bc246a1 100644 --- a/internal/observability/attribute/attribute.go +++ b/internal/observability/attribute/attribute.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package attribute import "go.opentelemetry.io/otel/attribute" diff --git a/internal/observability/attribute/attribute_test.go b/internal/observability/attribute/attribute_test.go index 7fed490af4d..05636bd6496 100644 --- a/internal/observability/attribute/attribute_test.go +++ b/internal/observability/attribute/attribute_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package attribute // NOT IMPLEMENTED BELOW diff --git a/internal/observability/exporter/exporter.go b/internal/observability/exporter/exporter.go index 707a209998e..d7d4405d4e0 100644 --- a/internal/observability/exporter/exporter.go +++ b/internal/observability/exporter/exporter.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package exporter import "context" diff --git a/internal/observability/exporter/otlp/option.go b/internal/observability/exporter/otlp/option.go index c452f093465..c357b4dbf99 100644 --- a/internal/observability/exporter/otlp/option.go +++ b/internal/observability/exporter/otlp/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package otlp import ( diff --git a/internal/observability/exporter/otlp/option_test.go b/internal/observability/exporter/otlp/option_test.go index 34f8a0f77de..1f877c3c419 100644 --- a/internal/observability/exporter/otlp/option_test.go +++ b/internal/observability/exporter/otlp/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package otlp // NOT IMPLEMENTED BELOW diff --git a/internal/observability/exporter/otlp/otlp.go b/internal/observability/exporter/otlp/otlp.go index 4edc3d6b4f1..4e42ef076c5 100644 --- a/internal/observability/exporter/otlp/otlp.go +++ b/internal/observability/exporter/otlp/otlp.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package otlp import ( diff --git a/internal/observability/exporter/otlp/otlp_test.go b/internal/observability/exporter/otlp/otlp_test.go index 49ff3276b9e..bcf5633c905 100644 --- a/internal/observability/exporter/otlp/otlp_test.go +++ b/internal/observability/exporter/otlp/otlp_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package otlp // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/agent/core/faiss/faiss.go b/internal/observability/metrics/agent/core/faiss/faiss.go index 96d78950938..5ff8c5a7401 100644 --- a/internal/observability/metrics/agent/core/faiss/faiss.go +++ b/internal/observability/metrics/agent/core/faiss/faiss.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package faiss import ( diff --git a/internal/observability/metrics/agent/core/faiss/faiss_test.go b/internal/observability/metrics/agent/core/faiss/faiss_test.go index 49d4dc8fb71..9f71218b876 100644 --- a/internal/observability/metrics/agent/core/faiss/faiss_test.go +++ b/internal/observability/metrics/agent/core/faiss/faiss_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package faiss // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/agent/core/ngt/ngt.go b/internal/observability/metrics/agent/core/ngt/ngt.go index dd6c8f328fd..cb570da8a46 100644 --- a/internal/observability/metrics/agent/core/ngt/ngt.go +++ b/internal/observability/metrics/agent/core/ngt/ngt.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package ngt import ( diff --git a/internal/observability/metrics/agent/core/ngt/ngt_test.go b/internal/observability/metrics/agent/core/ngt/ngt_test.go index ccf117e40e4..0c6a40db7b1 100644 --- a/internal/observability/metrics/agent/core/ngt/ngt_test.go +++ b/internal/observability/metrics/agent/core/ngt/ngt_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package ngt // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/agent/sidecar/sidecar.go b/internal/observability/metrics/agent/sidecar/sidecar.go index 5185980eef8..80a4d4fc616 100644 --- a/internal/observability/metrics/agent/sidecar/sidecar.go +++ b/internal/observability/metrics/agent/sidecar/sidecar.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package sidecar import ( diff --git a/internal/observability/metrics/agent/sidecar/sidecar_test.go b/internal/observability/metrics/agent/sidecar/sidecar_test.go index b68611efda0..4143537e644 100644 --- a/internal/observability/metrics/agent/sidecar/sidecar_test.go +++ b/internal/observability/metrics/agent/sidecar/sidecar_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package sidecar // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/backoff/backoff.go b/internal/observability/metrics/backoff/backoff.go index fadc3df53f8..af3877f5bfb 100644 --- a/internal/observability/metrics/backoff/backoff.go +++ b/internal/observability/metrics/backoff/backoff.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package backoff import ( diff --git a/internal/observability/metrics/backoff/backoff_test.go b/internal/observability/metrics/backoff/backoff_test.go index 11242b222f2..0b698acd46b 100644 --- a/internal/observability/metrics/backoff/backoff_test.go +++ b/internal/observability/metrics/backoff/backoff_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package backoff // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/circuitbreaker/circuitbreaker.go b/internal/observability/metrics/circuitbreaker/circuitbreaker.go index 72a66893266..2abb68c4b67 100644 --- a/internal/observability/metrics/circuitbreaker/circuitbreaker.go +++ b/internal/observability/metrics/circuitbreaker/circuitbreaker.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuitbreaker import ( diff --git a/internal/observability/metrics/circuitbreaker/circuitbreaker_test.go b/internal/observability/metrics/circuitbreaker/circuitbreaker_test.go index 37efe97660a..c0f8b1a0891 100644 --- a/internal/observability/metrics/circuitbreaker/circuitbreaker_test.go +++ b/internal/observability/metrics/circuitbreaker/circuitbreaker_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package circuitbreaker // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/gateway/mirror/mirror.go b/internal/observability/metrics/gateway/mirror/mirror.go index 6358010dfdb..d6666babbdf 100644 --- a/internal/observability/metrics/gateway/mirror/mirror.go +++ b/internal/observability/metrics/gateway/mirror/mirror.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package mirror import ( diff --git a/internal/observability/metrics/gateway/mirror/mirror_test.go b/internal/observability/metrics/gateway/mirror/mirror_test.go index 085094f7e74..3aa09dcc5e7 100644 --- a/internal/observability/metrics/gateway/mirror/mirror_test.go +++ b/internal/observability/metrics/gateway/mirror/mirror_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package mirror // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/grpc/grpc.go b/internal/observability/metrics/grpc/grpc.go index 707ed4e6e72..2dfd3771c81 100644 --- a/internal/observability/metrics/grpc/grpc.go +++ b/internal/observability/metrics/grpc/grpc.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/internal/observability/metrics/grpc/grpc_test.go b/internal/observability/metrics/grpc/grpc_test.go index 10247a68302..9ab5a838a8a 100644 --- a/internal/observability/metrics/grpc/grpc_test.go +++ b/internal/observability/metrics/grpc/grpc_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/index/job/correction/correction.go b/internal/observability/metrics/index/job/correction/correction.go index 0ca14c595cc..d7a65263a2c 100644 --- a/internal/observability/metrics/index/job/correction/correction.go +++ b/internal/observability/metrics/index/job/correction/correction.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package correction import ( diff --git a/internal/observability/metrics/index/job/correction/correction_test.go b/internal/observability/metrics/index/job/correction/correction_test.go index 7133ba6c383..ab79756f343 100644 --- a/internal/observability/metrics/index/job/correction/correction_test.go +++ b/internal/observability/metrics/index/job/correction/correction_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package correction // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/info/info.go b/internal/observability/metrics/info/info.go index 1fba9ead3ce..cab4a5e72d4 100644 --- a/internal/observability/metrics/info/info.go +++ b/internal/observability/metrics/info/info.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package info import ( diff --git a/internal/observability/metrics/info/info_test.go b/internal/observability/metrics/info/info_test.go index dbcbcaf04ea..c6a2995ddc7 100644 --- a/internal/observability/metrics/info/info_test.go +++ b/internal/observability/metrics/info/info_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package info // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/manager/index/index.go b/internal/observability/metrics/manager/index/index.go index 1a2b2a13351..5d7c5aaec97 100644 --- a/internal/observability/metrics/manager/index/index.go +++ b/internal/observability/metrics/manager/index/index.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package index import ( diff --git a/internal/observability/metrics/manager/index/index_test.go b/internal/observability/metrics/manager/index/index_test.go index 027ca9a1710..c843dd547d4 100644 --- a/internal/observability/metrics/manager/index/index_test.go +++ b/internal/observability/metrics/manager/index/index_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package index // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/mem/index/index.go b/internal/observability/metrics/mem/index/index.go index da9103bc837..ab27dfe1798 100644 --- a/internal/observability/metrics/mem/index/index.go +++ b/internal/observability/metrics/mem/index/index.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package index import ( diff --git a/internal/observability/metrics/mem/index/index_test.go b/internal/observability/metrics/mem/index/index_test.go index f5b3485345a..9e999ae0d95 100644 --- a/internal/observability/metrics/mem/index/index_test.go +++ b/internal/observability/metrics/mem/index/index_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package index // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/mem/mem.go b/internal/observability/metrics/mem/mem.go index 75cb3095a1b..99bad43b6ed 100644 --- a/internal/observability/metrics/mem/mem.go +++ b/internal/observability/metrics/mem/mem.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package mem import ( diff --git a/internal/observability/metrics/mem/mem_test.go b/internal/observability/metrics/mem/mem_test.go index 5ec15fefcae..fa8bc4ab020 100644 --- a/internal/observability/metrics/mem/mem_test.go +++ b/internal/observability/metrics/mem/mem_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package mem // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/metrics.go b/internal/observability/metrics/metrics.go index 9806ef7b86b..fac06733dbc 100644 --- a/internal/observability/metrics/metrics.go +++ b/internal/observability/metrics/metrics.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package metrics import ( diff --git a/internal/observability/metrics/metrics_test.go b/internal/observability/metrics/metrics_test.go index 0709d3d2f26..e85abdbfeb7 100644 --- a/internal/observability/metrics/metrics_test.go +++ b/internal/observability/metrics/metrics_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package metrics // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/runtime/cgo/cgo.go b/internal/observability/metrics/runtime/cgo/cgo.go index 6df46a2a349..0268c33d5f9 100644 --- a/internal/observability/metrics/runtime/cgo/cgo.go +++ b/internal/observability/metrics/runtime/cgo/cgo.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package cgo import ( diff --git a/internal/observability/metrics/runtime/cgo/cgo_test.go b/internal/observability/metrics/runtime/cgo/cgo_test.go index 868ad32f0a1..efda90ee6fb 100644 --- a/internal/observability/metrics/runtime/cgo/cgo_test.go +++ b/internal/observability/metrics/runtime/cgo/cgo_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package cgo // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/runtime/goroutine/goroutine.go b/internal/observability/metrics/runtime/goroutine/goroutine.go index cb848c583fe..775bee2df4d 100644 --- a/internal/observability/metrics/runtime/goroutine/goroutine.go +++ b/internal/observability/metrics/runtime/goroutine/goroutine.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package goroutine import ( diff --git a/internal/observability/metrics/runtime/goroutine/goroutine_test.go b/internal/observability/metrics/runtime/goroutine/goroutine_test.go index 3f227f83f41..a591627b1e9 100644 --- a/internal/observability/metrics/runtime/goroutine/goroutine_test.go +++ b/internal/observability/metrics/runtime/goroutine/goroutine_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package goroutine // NOT IMPLEMENTED BELOW diff --git a/internal/observability/metrics/tools/benchmark/benchmark.go b/internal/observability/metrics/tools/benchmark/benchmark.go index 426083996c7..d192136a50c 100644 --- a/internal/observability/metrics/tools/benchmark/benchmark.go +++ b/internal/observability/metrics/tools/benchmark/benchmark.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package benchmark import ( diff --git a/internal/observability/metrics/tools/benchmark/benchmark_test.go b/internal/observability/metrics/tools/benchmark/benchmark_test.go index 153773600d9..83111b652bf 100644 --- a/internal/observability/metrics/tools/benchmark/benchmark_test.go +++ b/internal/observability/metrics/tools/benchmark/benchmark_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package benchmark import ( diff --git a/internal/observability/metrics/version/version.go b/internal/observability/metrics/version/version.go index 4efbf6b18f8..61e4901ff37 100644 --- a/internal/observability/metrics/version/version.go +++ b/internal/observability/metrics/version/version.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package version import ( diff --git a/internal/observability/metrics/version/version_test.go b/internal/observability/metrics/version/version_test.go index 1fee6c94875..01f4547c376 100644 --- a/internal/observability/metrics/version/version_test.go +++ b/internal/observability/metrics/version/version_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package version // NOT IMPLEMENTED BELOW diff --git a/internal/observability/observability.go b/internal/observability/observability.go index 623df21ad7c..e65db4da0d0 100644 --- a/internal/observability/observability.go +++ b/internal/observability/observability.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package observability import ( diff --git a/internal/observability/observability_test.go b/internal/observability/observability_test.go index a894fb5c9a1..8f8621d9df2 100644 --- a/internal/observability/observability_test.go +++ b/internal/observability/observability_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package observability // NOT IMPLEMENTED BELOW diff --git a/internal/observability/option.go b/internal/observability/option.go index 24c549534c5..4d8d800574e 100644 --- a/internal/observability/option.go +++ b/internal/observability/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package observability import ( diff --git a/internal/observability/option_test.go b/internal/observability/option_test.go index 5f49e83ffae..0c43d45d854 100644 --- a/internal/observability/option_test.go +++ b/internal/observability/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package observability // NOT IMPLEMENTED BELOW diff --git a/internal/os/hostname_test.go b/internal/os/hostname_test.go index fc6f6bfad66..fc4949ddf42 100644 --- a/internal/os/hostname_test.go +++ b/internal/os/hostname_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package os // NOT IMPLEMENTED BELOW diff --git a/internal/rand/rand_bench_test.go b/internal/rand/rand_bench_test.go index 847cef3bddc..488e8fb82da 100644 --- a/internal/rand/rand_bench_test.go +++ b/internal/rand/rand_bench_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rand import ( diff --git a/internal/rand/rand_test.go b/internal/rand/rand_test.go index 7dcd7a3356a..6f949b97fd6 100644 --- a/internal/rand/rand_test.go +++ b/internal/rand/rand_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rand import ( diff --git a/internal/runner/runner_mock.go b/internal/runner/runner_mock.go index 98b5603b171..f2c88e20dc8 100644 --- a/internal/runner/runner_mock.go +++ b/internal/runner/runner_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package runner import "context" diff --git a/internal/runner/runner_race_test.go b/internal/runner/runner_race_test.go index 22dd211a4f5..fe92a55fcc7 100644 --- a/internal/runner/runner_race_test.go +++ b/internal/runner/runner_race_test.go @@ -1,18 +1,20 @@ //go:build !race +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package runner import ( diff --git a/internal/safety/safety_bench_test.go b/internal/safety/safety_bench_test.go index 7e0aff864f1..e70d20b8ca5 100644 --- a/internal/safety/safety_bench_test.go +++ b/internal/safety/safety_bench_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package safety import ( diff --git a/internal/safety/safety_test.go b/internal/safety/safety_test.go index 22c9f87ba8a..ce6f90b4485 100644 --- a/internal/safety/safety_test.go +++ b/internal/safety/safety_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package safety import ( diff --git a/internal/servers/option_test.go b/internal/servers/option_test.go index 0fddb62e783..9e05330b4d8 100644 --- a/internal/servers/option_test.go +++ b/internal/servers/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package servers import ( diff --git a/internal/servers/server/option_test.go b/internal/servers/server/option_test.go index 656a46101de..fda2db12d54 100644 --- a/internal/servers/server/option_test.go +++ b/internal/servers/server/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package server import ( diff --git a/internal/servers/server/server.go b/internal/servers/server/server.go index 959910b46ed..51aec64b1fd 100644 --- a/internal/servers/server/server.go +++ b/internal/servers/server/server.go @@ -288,12 +288,13 @@ func (s *server) ListenAndServe(ctx context.Context, ech chan<- error) (err erro } } - l, err := s.lc.Listen(ctx, func() string { + network := func() string { if s.network == 0 || s.network == net.Unknown || strings.EqualFold(s.network.String(), net.Unknown.String()) { return net.TCP.String() } return s.network.String() - }(), func() string { + }() + addr := func() string { if s.network == net.UNIX { if s.socketPath == "" { sockFile := strings.Join([]string{s.name, strconv.Itoa(os.Getpid()), "sock"}, ".") @@ -302,17 +303,47 @@ func (s *server) ListenAndServe(ctx context.Context, ech chan<- error) (err erro return s.socketPath } return net.JoinHostPort(s.host, s.port) - }()) - if err != nil { - log.Errorf("failed to listen socket %v", err) - return err - } - - if s.tcfg != nil && - (len(s.tcfg.Certificates) != 0 || - s.tcfg.GetCertificate != nil || - s.tcfg.GetConfigForClient != nil) { - l = tls.NewListener(l, s.tcfg) + }() + var l net.Listener + if s.tcfg != nil && net.IsUDP(network) { + log.Error("QUIC protocol is not supported yet") + return errors.ErrUnsupportedClientMethod + } else { + if net.IsUDP(network) { + network = net.TCP.String() + } + l, err = s.lc.Listen(ctx, network, addr) + if err != nil { + log.Errorf("failed to listen socket %v", err) + return err + } + var file *os.File + switch lt := l.(type) { + case *net.TCPListener: + file, err = lt.File() + if err != nil { + log.Errorf("failed to listen tcp socket %v", err) + return err + } + case *net.UnixListener: + file, err = lt.File() + if err != nil { + log.Errorf("failed to listen unix socket %v", err) + return err + } + } + if file != nil { + err = syscall.SetNonblock(int(file.Fd()), true) + if err != nil { + return err + } + } + if s.tcfg != nil && + (len(s.tcfg.Certificates) != 0 || + s.tcfg.GetCertificate != nil || + s.tcfg.GetConfigForClient != nil) { + l = tls.NewListener(l, s.tcfg) + } } if l == nil { @@ -427,9 +458,18 @@ func (s *server) Shutdown(ctx context.Context) (rerr error) { if err != nil && err != http.ErrServerClosed && err != grpc.ErrServerStopped { rerr = errors.Join(rerr, err) } + if err != nil && + !errors.Is(err, http.ErrServerClosed) && + !errors.Is(err, grpc.ErrServerStopped) && + !errors.Is(err, context.Canceled) && + !errors.Is(err, context.DeadlineExceeded) { + rerr = errors.Join(rerr, err) + } err = sctx.Err() - if err != nil && err != context.Canceled { + if err != nil && + !errors.Is(err, context.Canceled) && + !errors.Is(err, context.DeadlineExceeded) { rerr = errors.Join(rerr, err) } diff --git a/internal/servers/server/server_test.go b/internal/servers/server/server_test.go index b8accb317bb..3395b09b5bb 100644 --- a/internal/servers/server/server_test.go +++ b/internal/servers/server/server_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package server import ( diff --git a/internal/servers/servers.go b/internal/servers/servers.go index ddc6d4c4dd4..467fe51bf6d 100644 --- a/internal/servers/servers.go +++ b/internal/servers/servers.go @@ -63,14 +63,20 @@ func (l *listener) ListenAndServe(ctx context.Context) <-chan error { srv, ok := l.servers[name] if !ok || srv == nil { - ech <- errors.ErrServerNotFound(name) + select { + case <-ctx.Done(): + case ech <- errors.ErrServerNotFound(name): + } continue } if !l.servers[name].IsRunning() { err := l.servers[name].ListenAndServe(ctx, ech) if err != nil { - ech <- err + select { + case <-ctx.Done(): + case ech <- err: + } } } } @@ -79,7 +85,10 @@ func (l *listener) ListenAndServe(ctx context.Context) <-chan error { if !l.servers[name].IsRunning() { err := l.servers[name].ListenAndServe(ctx, ech) if err != nil { - ech <- err + select { + case <-ctx.Done(): + case ech <- err: + } } } } diff --git a/internal/servers/servers_mock.go b/internal/servers/servers_mock.go index f37a08ce9d5..23a2bc4cddf 100644 --- a/internal/servers/servers_mock.go +++ b/internal/servers/servers_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package servers import "context" diff --git a/internal/servers/servers_test.go b/internal/servers/servers_test.go index 2d71e840010..4e61704a0f1 100644 --- a/internal/servers/servers_test.go +++ b/internal/servers/servers_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package servers import ( diff --git a/internal/servers/starter/option_test.go b/internal/servers/starter/option_test.go index 28455b75198..a66d73ab8ed 100644 --- a/internal/servers/starter/option_test.go +++ b/internal/servers/starter/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package starter import ( diff --git a/internal/servers/starter/starter_test.go b/internal/servers/starter/starter_test.go index b5becde27b9..e42649dc45d 100644 --- a/internal/servers/starter/starter_test.go +++ b/internal/servers/starter/starter_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package starter import ( diff --git a/internal/strings/strings.go b/internal/strings/strings.go index 7eeafe2f7eb..b71bfac9202 100644 --- a/internal/strings/strings.go +++ b/internal/strings/strings.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package strings import ( diff --git a/internal/strings/strings_benchmark_test.go b/internal/strings/strings_benchmark_test.go index 1545aabe979..0fbef42440a 100644 --- a/internal/strings/strings_benchmark_test.go +++ b/internal/strings/strings_benchmark_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package strings import ( diff --git a/internal/strings/strings_test.go b/internal/strings/strings_test.go index 2da3a9440fc..484dcd20020 100644 --- a/internal/strings/strings_test.go +++ b/internal/strings/strings_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package strings import ( diff --git a/internal/sync/alias.go b/internal/sync/alias.go index e080ecf0c22..a701d3096f6 100644 --- a/internal/sync/alias.go +++ b/internal/sync/alias.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package sync import "sync" diff --git a/internal/sync/map.go b/internal/sync/map.go index ed33617a6b8..71c8929b2bc 100644 --- a/internal/sync/map.go +++ b/internal/sync/map.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package sync import gache "github.com/kpango/gache/v2" diff --git a/internal/sync/semaphore/semaphore_bench_test.go b/internal/sync/semaphore/semaphore_bench_test.go index 5f7cd68ae57..6fc94152dd4 100644 --- a/internal/sync/semaphore/semaphore_bench_test.go +++ b/internal/sync/semaphore/semaphore_bench_test.go @@ -30,6 +30,7 @@ // //go:build go1.7 + // +build go1.7 package semaphore_test diff --git a/internal/test/comparator/comparators.go b/internal/test/comparator/comparators.go index 16ff612b15a..af34f5c4009 100644 --- a/internal/test/comparator/comparators.go +++ b/internal/test/comparator/comparators.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package comparator import ( diff --git a/internal/test/comparator/standard.go b/internal/test/comparator/standard.go index 7f885cca5f7..66230130ca7 100644 --- a/internal/test/comparator/standard.go +++ b/internal/test/comparator/standard.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package comparator import ( diff --git a/internal/test/data/request/insert.go b/internal/test/data/request/insert.go index 6d6b4f142cd..f23cad30b99 100644 --- a/internal/test/data/request/insert.go +++ b/internal/test/data/request/insert.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package request import ( diff --git a/internal/test/data/request/insert_test.go b/internal/test/data/request/insert_test.go index 04df0bd48d5..b7017e473a4 100644 --- a/internal/test/data/request/insert_test.go +++ b/internal/test/data/request/insert_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package request import ( diff --git a/internal/test/data/request/object.go b/internal/test/data/request/object.go index 07f8de32d70..9654b1015f2 100644 --- a/internal/test/data/request/object.go +++ b/internal/test/data/request/object.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package request import ( diff --git a/internal/test/data/request/object_test.go b/internal/test/data/request/object_test.go index 4960df281ab..44d001ccc79 100644 --- a/internal/test/data/request/object_test.go +++ b/internal/test/data/request/object_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package request import ( diff --git a/internal/test/data/request/remove.go b/internal/test/data/request/remove.go index 172f9ddd4a5..7bdffe51163 100644 --- a/internal/test/data/request/remove.go +++ b/internal/test/data/request/remove.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package request import ( diff --git a/internal/test/data/request/remove_test.go b/internal/test/data/request/remove_test.go index 37d7d03a3ca..304dc90f505 100644 --- a/internal/test/data/request/remove_test.go +++ b/internal/test/data/request/remove_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package request import ( diff --git a/internal/test/data/strings/strings.go b/internal/test/data/strings/strings.go index a548b46f374..6cf6af71d9b 100644 --- a/internal/test/data/strings/strings.go +++ b/internal/test/data/strings/strings.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package strings import ( diff --git a/internal/test/data/strings/strings_benchmark_test.go b/internal/test/data/strings/strings_benchmark_test.go index 55ee2d27063..8fb2e73679c 100644 --- a/internal/test/data/strings/strings_benchmark_test.go +++ b/internal/test/data/strings/strings_benchmark_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package strings import ( diff --git a/internal/test/data/strings/strings_test.go b/internal/test/data/strings/strings_test.go index d280d81fd8f..53f313a48fb 100644 --- a/internal/test/data/strings/strings_test.go +++ b/internal/test/data/strings/strings_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package strings import ( diff --git a/internal/test/data/vector/gen.go b/internal/test/data/vector/gen.go index 31796f8866c..3989bc2cf4d 100644 --- a/internal/test/data/vector/gen.go +++ b/internal/test/data/vector/gen.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package vector import ( diff --git a/internal/test/data/vector/gen_test.go b/internal/test/data/vector/gen_test.go index 4f3049b4ae9..3d39d0b8ec9 100644 --- a/internal/test/data/vector/gen_test.go +++ b/internal/test/data/vector/gen_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package vector import ( diff --git a/internal/test/goleak/goleak.go b/internal/test/goleak/goleak.go index e1930baffb1..f7a81d05503 100644 --- a/internal/test/goleak/goleak.go +++ b/internal/test/goleak/goleak.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package goleak import "go.uber.org/goleak" diff --git a/internal/test/goleak/goleak_test.go b/internal/test/goleak/goleak_test.go index a4e01122054..acef27cfb93 100644 --- a/internal/test/goleak/goleak_test.go +++ b/internal/test/goleak/goleak_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package goleak // NOT IMPLEMENTED BELOW diff --git a/internal/test/mock/client/discoverer_client_mock.go b/internal/test/mock/client/discoverer_client_mock.go index da67fdd859a..ed8ff4d1e64 100644 --- a/internal/test/mock/client/discoverer_client_mock.go +++ b/internal/test/mock/client/discoverer_client_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package client import ( diff --git a/internal/test/mock/client/mirror_client_mock.go b/internal/test/mock/client/mirror_client_mock.go index ec0e075298c..b006d5ae626 100644 --- a/internal/test/mock/client/mirror_client_mock.go +++ b/internal/test/mock/client/mirror_client_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package client import ( diff --git a/internal/test/mock/controller_runtime.go b/internal/test/mock/controller_runtime.go index 7ec38894a47..466388bc115 100644 --- a/internal/test/mock/controller_runtime.go +++ b/internal/test/mock/controller_runtime.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package mock import ( diff --git a/internal/test/mock/grpc/grpc_client_mock.go b/internal/test/mock/grpc/grpc_client_mock.go index a8c7d43f4d8..05130cffff3 100644 --- a/internal/test/mock/grpc/grpc_client_mock.go +++ b/internal/test/mock/grpc/grpc_client_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/internal/test/mock/grpc_testify_mock.go b/internal/test/mock/grpc_testify_mock.go index cca58973f4d..dc8930d5518 100644 --- a/internal/test/mock/grpc_testify_mock.go +++ b/internal/test/mock/grpc_testify_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package mock import ( diff --git a/internal/test/mock/k8s/client.go b/internal/test/mock/k8s/client.go index dfce1c16b9e..3802a66d6f3 100644 --- a/internal/test/mock/k8s/client.go +++ b/internal/test/mock/k8s/client.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package k8s import ( diff --git a/internal/test/mock/k8s/controller_runtime.go b/internal/test/mock/k8s/controller_runtime.go index 039f1945adc..6c1539c66f3 100644 --- a/internal/test/mock/k8s/controller_runtime.go +++ b/internal/test/mock/k8s/controller_runtime.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package k8s import ( diff --git a/internal/test/mock/k8s/reconciler.go b/internal/test/mock/k8s/reconciler.go index 09809d70123..b0804b19160 100644 --- a/internal/test/mock/k8s/reconciler.go +++ b/internal/test/mock/k8s/reconciler.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package k8s import ( diff --git a/internal/test/mock/server_stream.go b/internal/test/mock/server_stream.go index 2e4c2abcc85..c16d3566480 100644 --- a/internal/test/mock/server_stream.go +++ b/internal/test/mock/server_stream.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package mock import ( diff --git a/internal/test/testdata.go b/internal/test/testdata.go index ff6da4b16fc..4d878681bea 100644 --- a/internal/test/testdata.go +++ b/internal/test/testdata.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package test import ( diff --git a/internal/test/testdata_test.go b/internal/test/testdata_test.go index e68403dbb7b..004f2d48cd0 100644 --- a/internal/test/testdata_test.go +++ b/internal/test/testdata_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package test import ( diff --git a/internal/test/testify/testify.go b/internal/test/testify/testify.go index 5c6c5896ced..23b40d18d3a 100644 --- a/internal/test/testify/testify.go +++ b/internal/test/testify/testify.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package testify import "github.com/stretchr/testify/mock" diff --git a/internal/timeutil/location/loc.go b/internal/timeutil/location/loc.go index 4b79670e46e..fb729d7ef90 100644 --- a/internal/timeutil/location/loc.go +++ b/internal/timeutil/location/loc.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package location import "time" diff --git a/internal/timeutil/location/loc_bench_test.go b/internal/timeutil/location/loc_bench_test.go index 756fce782e4..b1fd2539dc6 100644 --- a/internal/timeutil/location/loc_bench_test.go +++ b/internal/timeutil/location/loc_bench_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package location import "testing" diff --git a/internal/timeutil/location/loc_test.go b/internal/timeutil/location/loc_test.go index e0cb05986db..b0f5f28e71b 100644 --- a/internal/timeutil/location/loc_test.go +++ b/internal/timeutil/location/loc_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package location import ( diff --git a/internal/timeutil/location/set.go b/internal/timeutil/location/set.go index c6524d8d433..a6eaf3dfa22 100644 --- a/internal/timeutil/location/set.go +++ b/internal/timeutil/location/set.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package location import ( diff --git a/internal/timeutil/location/set_test.go b/internal/timeutil/location/set_test.go index 00e8ebb88da..40fd82207f7 100644 --- a/internal/timeutil/location/set_test.go +++ b/internal/timeutil/location/set_test.go @@ -1,18 +1,20 @@ //go:build !race +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package location import ( diff --git a/internal/timeutil/rate/rate_test.go b/internal/timeutil/rate/rate_test.go index be8062d434b..ee886a39df4 100644 --- a/internal/timeutil/rate/rate_test.go +++ b/internal/timeutil/rate/rate_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rate // NOT IMPLEMENTED BELOW diff --git a/internal/timeutil/time_bench_test.go b/internal/timeutil/time_bench_test.go index 7b20f4d45cd..ed86776bec7 100644 --- a/internal/timeutil/time_bench_test.go +++ b/internal/timeutil/time_bench_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package timeutil import ( diff --git a/internal/version/version_test.go b/internal/version/version_test.go index 7465548bf3d..52432ba720c 100644 --- a/internal/version/version_test.go +++ b/internal/version/version_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package version import ( diff --git a/internal/worker/queue_mock.go b/internal/worker/queue_mock.go index a3d35cbed48..53c4d484972 100644 --- a/internal/worker/queue_mock.go +++ b/internal/worker/queue_mock.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package worker import "context" diff --git a/k8s/agent/clusterrole.yaml b/k8s/agent/clusterrole.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/agent/clusterrolebinding.yaml b/k8s/agent/clusterrolebinding.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/agent/daemonset.yaml b/k8s/agent/daemonset.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/agent/deployment.yaml b/k8s/agent/deployment.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/agent/faiss/configmap.yaml b/k8s/agent/faiss/configmap.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/agent/hpa.yaml b/k8s/agent/hpa.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/agent/networkpolicy.yaml b/k8s/agent/networkpolicy.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/agent/pdb.yaml b/k8s/agent/pdb.yaml index b3402fe116e..34ba97f34c6 100644 --- a/k8s/agent/pdb.yaml +++ b/k8s/agent/pdb.yaml @@ -29,3 +29,4 @@ spec: selector: matchLabels: app: vald-agent + unhealthyPodEvictionPolicy: IfHealthyBudget diff --git a/k8s/agent/serviceaccount.yaml b/k8s/agent/serviceaccount.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/agent/sidecar/configmap.yaml b/k8s/agent/sidecar/configmap.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/agent/sidecar/svc.yaml b/k8s/agent/sidecar/svc.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/discoverer/configmap.yaml b/k8s/discoverer/configmap.yaml index 738816e3168..86ac6e9760f 100644 --- a/k8s/discoverer/configmap.yaml +++ b/k8s/discoverer/configmap.yaml @@ -269,6 +269,7 @@ data: cache_enabled: true cache_expiration: 24h refresh_duration: 5m + network: tcp socket_option: ip_recover_destination_addr: false ip_transparent: false diff --git a/k8s/discoverer/daemonset.yaml b/k8s/discoverer/daemonset.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/discoverer/deployment.yaml b/k8s/discoverer/deployment.yaml index d74f417316c..3e88680bf7f 100644 --- a/k8s/discoverer/deployment.yaml +++ b/k8s/discoverer/deployment.yaml @@ -46,7 +46,7 @@ spec: app.kubernetes.io/instance: release-name app.kubernetes.io/component: discoverer annotations: - checksum/configmap: f84f9a4347f265eda0f017bc36b547522041d0612901f77e7d4ac38361c61f87 + checksum/configmap: 59dc2f613bfcf9d9a74e6a53e3fd58ffb09e9213c03ec7f4181be055c4f59edb profefe.com/enable: "true" profefe.com/port: "6060" profefe.com/service: vald-discoverer diff --git a/k8s/discoverer/hpa.yaml b/k8s/discoverer/hpa.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/discoverer/networkpolicy.yaml b/k8s/discoverer/networkpolicy.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/discoverer/pdb.yaml b/k8s/discoverer/pdb.yaml index f7bd13f346d..3973406ecfb 100644 --- a/k8s/discoverer/pdb.yaml +++ b/k8s/discoverer/pdb.yaml @@ -29,3 +29,4 @@ spec: selector: matchLabels: app: vald-discoverer + unhealthyPodEvictionPolicy: AlwaysAllow diff --git a/k8s/gateway/gateway/filter/configmap.yaml b/k8s/gateway/gateway/filter/configmap.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/gateway/gateway/filter/daemonset.yaml b/k8s/gateway/gateway/filter/daemonset.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/gateway/gateway/filter/deployment.yaml b/k8s/gateway/gateway/filter/deployment.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/gateway/gateway/filter/hpa.yaml b/k8s/gateway/gateway/filter/hpa.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/gateway/gateway/filter/networkpolicy.yaml b/k8s/gateway/gateway/filter/networkpolicy.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/gateway/gateway/filter/pdb.yaml b/k8s/gateway/gateway/filter/pdb.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/gateway/gateway/filter/priorityclass.yaml b/k8s/gateway/gateway/filter/priorityclass.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/gateway/gateway/filter/svc.yaml b/k8s/gateway/gateway/filter/svc.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/gateway/gateway/lb/configmap.yaml b/k8s/gateway/gateway/lb/configmap.yaml index d1710bf750c..d188c411d92 100644 --- a/k8s/gateway/gateway/lb/configmap.yaml +++ b/k8s/gateway/gateway/lb/configmap.yaml @@ -306,6 +306,7 @@ data: cache_enabled: true cache_expiration: 1h refresh_duration: 30m + network: tcp socket_option: ip_recover_destination_addr: false ip_transparent: false @@ -392,6 +393,7 @@ data: cache_enabled: true cache_expiration: 1h refresh_duration: 30m + network: tcp socket_option: ip_recover_destination_addr: false ip_transparent: false diff --git a/k8s/gateway/gateway/lb/daemonset.yaml b/k8s/gateway/gateway/lb/daemonset.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/gateway/gateway/lb/deployment.yaml b/k8s/gateway/gateway/lb/deployment.yaml index 2697492e13c..07e176bb7db 100644 --- a/k8s/gateway/gateway/lb/deployment.yaml +++ b/k8s/gateway/gateway/lb/deployment.yaml @@ -45,7 +45,7 @@ spec: app.kubernetes.io/instance: release-name app.kubernetes.io/component: gateway-lb annotations: - checksum/configmap: 63a6ba288fa5fba551f7383b7fa986cfe2b70ef620a1ed78600bbddae185e9e5 + checksum/configmap: 34833ada0d57883cd1515c5a66afe131e89919e947127f303f52f4f265316915 profefe.com/enable: "true" profefe.com/port: "6060" profefe.com/service: vald-lb-gateway diff --git a/k8s/gateway/gateway/lb/networkpolicy.yaml b/k8s/gateway/gateway/lb/networkpolicy.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/gateway/gateway/lb/pdb.yaml b/k8s/gateway/gateway/lb/pdb.yaml index dd163db3456..e43ebbecc7c 100644 --- a/k8s/gateway/gateway/lb/pdb.yaml +++ b/k8s/gateway/gateway/lb/pdb.yaml @@ -29,3 +29,4 @@ spec: selector: matchLabels: app: vald-lb-gateway + unhealthyPodEvictionPolicy: AlwaysAllow diff --git a/k8s/gateway/gateway/mirror/configmap.yaml b/k8s/gateway/gateway/mirror/configmap.yaml index 305ee92678a..bf3208622e5 100644 --- a/k8s/gateway/gateway/mirror/configmap.yaml +++ b/k8s/gateway/gateway/mirror/configmap.yaml @@ -25,4 +25,4 @@ metadata: app.kubernetes.io/version: v1.7.14 app.kubernetes.io/component: gateway-mirror data: - config.yaml: "---\nversion: v0.0.0\ntime_zone: UTC\nlogging:\n format: raw\n level: debug\n logger: glg\nserver_config:\n servers:\n - name: grpc\n host: 0.0.0.0\n port: 8081\n grpc:\n bidirectional_stream_concurrency: 20\n connection_timeout: \"\"\n enable_admin: true\n enable_channelz: true\n enable_reflection: true\n header_table_size: 0\n initial_conn_window_size: 2097152\n initial_window_size: 1048576\n interceptors:\n - RecoverInterceptor\n keepalive:\n max_conn_age: \"\"\n max_conn_age_grace: \"\"\n max_conn_idle: \"\"\n min_time: 10m\n permit_without_stream: false\n time: 3h\n timeout: 60s\n max_concurrent_streams: 0\n max_header_list_size: 0\n max_receive_message_size: 0\n max_send_message_size: 0\n num_stream_workers: 0\n read_buffer_size: 0\n shared_write_buffer: false\n wait_for_handlers: true\n write_buffer_size: 0\n mode: GRPC\n network: tcp\n probe_wait_time: 3s\n restart: true\n socket_option:\n ip_recover_destination_addr: false\n ip_transparent: false\n reuse_addr: true\n reuse_port: true\n tcp_cork: false\n tcp_defer_accept: false\n tcp_fast_open: false\n tcp_no_delay: false\n tcp_quick_ack: false\n socket_path: \"\"\n health_check_servers:\n - name: liveness\n host: 0.0.0.0\n port: 3000\n http:\n handler_timeout: \"\"\n http2:\n enabled: false\n handler_limit: 0\n max_concurrent_streams: 0\n max_decoder_header_table_size: 4096\n max_encoder_header_table_size: 4096\n max_read_frame_size: 0\n max_upload_buffer_per_connection: 0\n max_upload_buffer_per_stream: 0\n permit_prohibited_cipher_suites: true\n idle_timeout: \"\"\n read_header_timeout: \"\"\n read_timeout: \"\"\n shutdown_duration: 5s\n write_timeout: \"\"\n mode: REST\n network: tcp\n probe_wait_time: 3s\n restart: true\n socket_option:\n ip_recover_destination_addr: false\n ip_transparent: false\n reuse_addr: true\n reuse_port: true\n tcp_cork: false\n tcp_defer_accept: false\n tcp_fast_open: true\n tcp_no_delay: true\n tcp_quick_ack: true\n socket_path: \"\"\n - name: readiness\n host: 0.0.0.0\n port: 3001\n http:\n handler_timeout: \"\"\n http2:\n enabled: false\n handler_limit: 0\n max_concurrent_streams: 0\n max_decoder_header_table_size: 4096\n max_encoder_header_table_size: 4096\n max_read_frame_size: 0\n max_upload_buffer_per_connection: 0\n max_upload_buffer_per_stream: 0\n permit_prohibited_cipher_suites: true\n idle_timeout: \"\"\n read_header_timeout: \"\"\n read_timeout: \"\"\n shutdown_duration: 0s\n write_timeout: \"\"\n mode: REST\n network: tcp\n probe_wait_time: 3s\n restart: true\n socket_option:\n ip_recover_destination_addr: false\n ip_transparent: false\n reuse_addr: true\n reuse_port: true\n tcp_cork: false\n tcp_defer_accept: false\n tcp_fast_open: true\n tcp_no_delay: true\n tcp_quick_ack: true\n socket_path: \"\"\n metrics_servers:\n - name: pprof\n host: 0.0.0.0\n port: 6060\n http:\n handler_timeout: 5s\n http2:\n enabled: false\n handler_limit: 0\n max_concurrent_streams: 0\n max_decoder_header_table_size: 4096\n max_encoder_header_table_size: 4096\n max_read_frame_size: 0\n max_upload_buffer_per_connection: 0\n max_upload_buffer_per_stream: 0\n permit_prohibited_cipher_suites: true\n idle_timeout: 2s\n read_header_timeout: 1s\n read_timeout: 1s\n shutdown_duration: 5s\n write_timeout: 1m\n mode: REST\n network: tcp\n probe_wait_time: 3s\n restart: true\n socket_option:\n ip_recover_destination_addr: false\n ip_transparent: false\n reuse_addr: true\n reuse_port: true\n tcp_cork: true\n tcp_defer_accept: false\n tcp_fast_open: false\n tcp_no_delay: false\n tcp_quick_ack: false\n socket_path: \"\"\n startup_strategy:\n - liveness\n - pprof\n - grpc\n - readiness\n shutdown_strategy:\n - readiness\n - grpc\n - pprof\n - liveness\n full_shutdown_duration: 600s\n tls:\n ca: /path/to/ca\n cert: /path/to/cert\n enabled: false\n insecure_skip_verify: false\n key: /path/to/key\nobservability:\n enabled: false\n otlp:\n collector_endpoint: \"\"\n trace_batch_timeout: \"1s\"\n trace_export_timeout: \"1m\"\n trace_max_export_batch_size: 1024\n trace_max_queue_size: 256\n metrics_export_interval: \"1s\"\n metrics_export_timeout: \"1m\"\n attribute:\n namespace: \"_MY_POD_NAMESPACE_\"\n pod_name: \"_MY_POD_NAME_\"\n node_name: \"_MY_NODE_NAME_\"\n service_name: \"vald-mirror-gateway\"\n metrics:\n enable_cgo: true\n enable_goroutine: true\n enable_memory: true\n enable_version_info: true\n version_info_labels:\n - vald_version\n - server_name\n - git_commit\n - build_time\n - go_version\n - go_os\n - go_arch\n - algorithm_info\n trace:\n enabled: false\ngateway:\n pod_name: _MY_POD_NAME_\n register_duration: 1s\n namespace: _MY_POD_NAMESPACE_\n discovery_duration: 1s\n colocation: dc1\n group: \n net:\n dialer:\n dual_stack_enabled: false\n keepalive: 10m\n timeout: 30s\n dns:\n cache_enabled: true\n cache_expiration: 24h\n refresh_duration: 5m\n socket_option:\n ip_recover_destination_addr: false\n ip_transparent: false\n reuse_addr: true\n reuse_port: true\n tcp_cork: false\n tcp_defer_accept: true\n tcp_fast_open: true\n tcp_no_delay: true\n tcp_quick_ack: true\n tls:\n ca: /path/to/ca\n cert: /path/to/cert\n enabled: false\n insecure_skip_verify: false\n key: /path/to/key\n client:\n addrs:\n - vald-lb-gateway.default.svc.cluster.local:8081\n health_check_duration: \"1s\"\n connection_pool:\n enable_dns_resolver: true\n enable_rebalance: true\n old_conn_close_duration: 2m\n rebalance_duration: 30m\n size: 3\n backoff:\n backoff_factor: 1.1\n backoff_time_limit: 5s\n enable_error_log: true\n initial_duration: 5ms\n jitter_limit: 100ms\n maximum_duration: 5s\n retry_count: 100\n circuit_breaker:\n closed_error_rate: 0.7\n closed_refresh_timeout: 10s\n half_open_error_rate: 0.5\n min_samples: 1000\n open_timeout: 1s\n call_option:\n content_subtype: \"\"\n max_recv_msg_size: 0\n max_retry_rpc_buffer_size: 0\n max_send_msg_size: 0\n wait_for_ready: true\n dial_option:\n authority: \"\"\n backoff_base_delay: 1s\n backoff_jitter: 0.2\n backoff_max_delay: 120s\n backoff_multiplier: 1.6\n disable_retry: false\n enable_backoff: false\n idle_timeout: 1h\n initial_connection_window_size: 2097152\n initial_window_size: 1048576\n insecure: true\n interceptors: []\n keepalive:\n permit_without_stream: false\n time: \"\"\n timeout: 30s\n max_call_attempts: 0\n max_header_list_size: 0\n max_msg_size: 0\n min_connection_timeout: 20s\n net:\n dialer:\n dual_stack_enabled: true\n keepalive: \"\"\n timeout: \"\"\n dns:\n cache_enabled: true\n cache_expiration: 1h\n refresh_duration: 30m\n socket_option:\n ip_recover_destination_addr: false\n ip_transparent: false\n reuse_addr: true\n reuse_port: true\n tcp_cork: false\n tcp_defer_accept: false\n tcp_fast_open: false\n tcp_no_delay: false\n tcp_quick_ack: false\n tls:\n ca: /path/to/ca\n cert: /path/to/cert\n enabled: false\n insecure_skip_verify: false\n key: /path/to/key\n read_buffer_size: 0\n shared_write_buffer: false\n timeout: \"\"\n user_agent: Vald-gRPC\n write_buffer_size: 0\n tls:\n ca: /path/to/ca\n cert: /path/to/cert\n enabled: false\n insecure_skip_verify: false\n key: /path/to/key\n self_mirror_addr: vald-mirror-gateway.default.svc.cluster.local:8081\n gateway_addr: vald-lb-gateway.default.svc.cluster.local:8081\n" + config.yaml: "---\nversion: v0.0.0\ntime_zone: UTC\nlogging:\n format: raw\n level: debug\n logger: glg\nserver_config:\n servers:\n - name: grpc\n host: 0.0.0.0\n port: 8081\n grpc:\n bidirectional_stream_concurrency: 20\n connection_timeout: \"\"\n enable_admin: true\n enable_channelz: true\n enable_reflection: true\n header_table_size: 0\n initial_conn_window_size: 2097152\n initial_window_size: 1048576\n interceptors:\n - RecoverInterceptor\n keepalive:\n max_conn_age: \"\"\n max_conn_age_grace: \"\"\n max_conn_idle: \"\"\n min_time: 10m\n permit_without_stream: false\n time: 3h\n timeout: 60s\n max_concurrent_streams: 0\n max_header_list_size: 0\n max_receive_message_size: 0\n max_send_message_size: 0\n num_stream_workers: 0\n read_buffer_size: 0\n shared_write_buffer: false\n wait_for_handlers: true\n write_buffer_size: 0\n mode: GRPC\n network: tcp\n probe_wait_time: 3s\n restart: true\n socket_option:\n ip_recover_destination_addr: false\n ip_transparent: false\n reuse_addr: true\n reuse_port: true\n tcp_cork: false\n tcp_defer_accept: false\n tcp_fast_open: false\n tcp_no_delay: false\n tcp_quick_ack: false\n socket_path: \"\"\n health_check_servers:\n - name: liveness\n host: 0.0.0.0\n port: 3000\n http:\n handler_timeout: \"\"\n http2:\n enabled: false\n handler_limit: 0\n max_concurrent_streams: 0\n max_decoder_header_table_size: 4096\n max_encoder_header_table_size: 4096\n max_read_frame_size: 0\n max_upload_buffer_per_connection: 0\n max_upload_buffer_per_stream: 0\n permit_prohibited_cipher_suites: true\n idle_timeout: \"\"\n read_header_timeout: \"\"\n read_timeout: \"\"\n shutdown_duration: 5s\n write_timeout: \"\"\n mode: REST\n network: tcp\n probe_wait_time: 3s\n restart: true\n socket_option:\n ip_recover_destination_addr: false\n ip_transparent: false\n reuse_addr: true\n reuse_port: true\n tcp_cork: false\n tcp_defer_accept: false\n tcp_fast_open: true\n tcp_no_delay: true\n tcp_quick_ack: true\n socket_path: \"\"\n - name: readiness\n host: 0.0.0.0\n port: 3001\n http:\n handler_timeout: \"\"\n http2:\n enabled: false\n handler_limit: 0\n max_concurrent_streams: 0\n max_decoder_header_table_size: 4096\n max_encoder_header_table_size: 4096\n max_read_frame_size: 0\n max_upload_buffer_per_connection: 0\n max_upload_buffer_per_stream: 0\n permit_prohibited_cipher_suites: true\n idle_timeout: \"\"\n read_header_timeout: \"\"\n read_timeout: \"\"\n shutdown_duration: 0s\n write_timeout: \"\"\n mode: REST\n network: tcp\n probe_wait_time: 3s\n restart: true\n socket_option:\n ip_recover_destination_addr: false\n ip_transparent: false\n reuse_addr: true\n reuse_port: true\n tcp_cork: false\n tcp_defer_accept: false\n tcp_fast_open: true\n tcp_no_delay: true\n tcp_quick_ack: true\n socket_path: \"\"\n metrics_servers:\n - name: pprof\n host: 0.0.0.0\n port: 6060\n http:\n handler_timeout: 5s\n http2:\n enabled: false\n handler_limit: 0\n max_concurrent_streams: 0\n max_decoder_header_table_size: 4096\n max_encoder_header_table_size: 4096\n max_read_frame_size: 0\n max_upload_buffer_per_connection: 0\n max_upload_buffer_per_stream: 0\n permit_prohibited_cipher_suites: true\n idle_timeout: 2s\n read_header_timeout: 1s\n read_timeout: 1s\n shutdown_duration: 5s\n write_timeout: 1m\n mode: REST\n network: tcp\n probe_wait_time: 3s\n restart: true\n socket_option:\n ip_recover_destination_addr: false\n ip_transparent: false\n reuse_addr: true\n reuse_port: true\n tcp_cork: true\n tcp_defer_accept: false\n tcp_fast_open: false\n tcp_no_delay: false\n tcp_quick_ack: false\n socket_path: \"\"\n startup_strategy:\n - liveness\n - pprof\n - grpc\n - readiness\n shutdown_strategy:\n - readiness\n - grpc\n - pprof\n - liveness\n full_shutdown_duration: 600s\n tls:\n ca: /path/to/ca\n cert: /path/to/cert\n enabled: false\n insecure_skip_verify: false\n key: /path/to/key\nobservability:\n enabled: false\n otlp:\n collector_endpoint: \"\"\n trace_batch_timeout: \"1s\"\n trace_export_timeout: \"1m\"\n trace_max_export_batch_size: 1024\n trace_max_queue_size: 256\n metrics_export_interval: \"1s\"\n metrics_export_timeout: \"1m\"\n attribute:\n namespace: \"_MY_POD_NAMESPACE_\"\n pod_name: \"_MY_POD_NAME_\"\n node_name: \"_MY_NODE_NAME_\"\n service_name: \"vald-mirror-gateway\"\n metrics:\n enable_cgo: true\n enable_goroutine: true\n enable_memory: true\n enable_version_info: true\n version_info_labels:\n - vald_version\n - server_name\n - git_commit\n - build_time\n - go_version\n - go_os\n - go_arch\n - algorithm_info\n trace:\n enabled: false\ngateway:\n pod_name: _MY_POD_NAME_\n register_duration: 1s\n namespace: _MY_POD_NAMESPACE_\n discovery_duration: 1s\n colocation: dc1\n group: \n net:\n dialer:\n dual_stack_enabled: false\n keepalive: 10m\n timeout: 30s\n dns:\n cache_enabled: true\n cache_expiration: 24h\n refresh_duration: 5m\n network: tcp\n socket_option:\n ip_recover_destination_addr: false\n ip_transparent: false\n reuse_addr: true\n reuse_port: true\n tcp_cork: false\n tcp_defer_accept: true\n tcp_fast_open: true\n tcp_no_delay: true\n tcp_quick_ack: true\n tls:\n ca: /path/to/ca\n cert: /path/to/cert\n enabled: false\n insecure_skip_verify: false\n key: /path/to/key\n client:\n addrs:\n - vald-lb-gateway.default.svc.cluster.local:8081\n health_check_duration: \"1s\"\n connection_pool:\n enable_dns_resolver: true\n enable_rebalance: true\n old_conn_close_duration: 2m\n rebalance_duration: 30m\n size: 3\n backoff:\n backoff_factor: 1.1\n backoff_time_limit: 5s\n enable_error_log: true\n initial_duration: 5ms\n jitter_limit: 100ms\n maximum_duration: 5s\n retry_count: 100\n circuit_breaker:\n closed_error_rate: 0.7\n closed_refresh_timeout: 10s\n half_open_error_rate: 0.5\n min_samples: 1000\n open_timeout: 1s\n call_option:\n content_subtype: \"\"\n max_recv_msg_size: 0\n max_retry_rpc_buffer_size: 0\n max_send_msg_size: 0\n wait_for_ready: true\n dial_option:\n authority: \"\"\n backoff_base_delay: 1s\n backoff_jitter: 0.2\n backoff_max_delay: 120s\n backoff_multiplier: 1.6\n disable_retry: false\n enable_backoff: false\n idle_timeout: 1h\n initial_connection_window_size: 2097152\n initial_window_size: 1048576\n insecure: true\n interceptors: []\n keepalive:\n permit_without_stream: false\n time: \"\"\n timeout: 30s\n max_call_attempts: 0\n max_header_list_size: 0\n max_msg_size: 0\n min_connection_timeout: 20s\n net:\n dialer:\n dual_stack_enabled: true\n keepalive: \"\"\n timeout: \"\"\n dns:\n cache_enabled: true\n cache_expiration: 1h\n refresh_duration: 30m\n network: tcp\n socket_option:\n ip_recover_destination_addr: false\n ip_transparent: false\n reuse_addr: true\n reuse_port: true\n tcp_cork: false\n tcp_defer_accept: false\n tcp_fast_open: false\n tcp_no_delay: false\n tcp_quick_ack: false\n tls:\n ca: /path/to/ca\n cert: /path/to/cert\n enabled: false\n insecure_skip_verify: false\n key: /path/to/key\n read_buffer_size: 0\n shared_write_buffer: false\n timeout: \"\"\n user_agent: Vald-gRPC\n write_buffer_size: 0\n tls:\n ca: /path/to/ca\n cert: /path/to/cert\n enabled: false\n insecure_skip_verify: false\n key: /path/to/key\n self_mirror_addr: vald-mirror-gateway.default.svc.cluster.local:8081\n gateway_addr: vald-lb-gateway.default.svc.cluster.local:8081\n" diff --git a/k8s/gateway/gateway/mirror/daemonset.yaml b/k8s/gateway/gateway/mirror/daemonset.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/gateway/gateway/mirror/deployment.yaml b/k8s/gateway/gateway/mirror/deployment.yaml index 9d59372c798..5a0c8ab491b 100644 --- a/k8s/gateway/gateway/mirror/deployment.yaml +++ b/k8s/gateway/gateway/mirror/deployment.yaml @@ -45,7 +45,7 @@ spec: app.kubernetes.io/instance: release-name app.kubernetes.io/component: gateway-mirror annotations: - checksum/configmap: 0ef2f36d15c8d866aaa135cc46793f9c7d3111b07c4b7988526ce391b99fd9b5 + checksum/configmap: 5fec186a5052df1bd407582ddeb40b15289021ecfe3aa111d14fff4222d07291 pyroscope.io/scrape: "true" pyroscope.io/application-name: vald-mirror-gateway pyroscope.io/profile-cpu-enabled: "true" diff --git a/k8s/gateway/gateway/mirror/networkpolicy.yaml b/k8s/gateway/gateway/mirror/networkpolicy.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/gateway/gateway/mirror/pdb.yaml b/k8s/gateway/gateway/mirror/pdb.yaml index 77707bd3b47..930ad3b340b 100644 --- a/k8s/gateway/gateway/mirror/pdb.yaml +++ b/k8s/gateway/gateway/mirror/pdb.yaml @@ -29,3 +29,4 @@ spec: selector: matchLabels: app: vald-mirror-gateway + unhealthyPodEvictionPolicy: AlwaysAllow diff --git a/k8s/index/job/correction/configmap.yaml b/k8s/index/job/correction/configmap.yaml index a122e57f493..72550c006b9 100644 --- a/k8s/index/job/correction/configmap.yaml +++ b/k8s/index/job/correction/configmap.yaml @@ -306,6 +306,7 @@ data: cache_enabled: true cache_expiration: 1h refresh_duration: 30m + network: tcp socket_option: ip_recover_destination_addr: false ip_transparent: false @@ -395,6 +396,7 @@ data: cache_enabled: true cache_expiration: 1h refresh_duration: 30m + network: tcp socket_option: ip_recover_destination_addr: false ip_transparent: false diff --git a/k8s/index/job/correction/networkpolicy.yaml b/k8s/index/job/correction/networkpolicy.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/index/job/creation/configmap.yaml b/k8s/index/job/creation/configmap.yaml index 0aad0f9eb95..b3353178004 100644 --- a/k8s/index/job/creation/configmap.yaml +++ b/k8s/index/job/creation/configmap.yaml @@ -306,6 +306,7 @@ data: cache_enabled: true cache_expiration: 1h refresh_duration: 30m + network: tcp socket_option: ip_recover_destination_addr: false ip_transparent: false diff --git a/k8s/index/job/creation/networkpolicy.yaml b/k8s/index/job/creation/networkpolicy.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/index/job/readreplica/rotate/clusterrole.yaml b/k8s/index/job/readreplica/rotate/clusterrole.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/index/job/readreplica/rotate/clusterrolebinding.yaml b/k8s/index/job/readreplica/rotate/clusterrolebinding.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/index/job/readreplica/rotate/configmap.yaml b/k8s/index/job/readreplica/rotate/configmap.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/index/job/readreplica/rotate/networkpolicy.yaml b/k8s/index/job/readreplica/rotate/networkpolicy.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/index/job/readreplica/rotate/serviceaccount.yaml b/k8s/index/job/readreplica/rotate/serviceaccount.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/index/job/save/configmap.yaml b/k8s/index/job/save/configmap.yaml index 4c47cbb7d25..c815e56b083 100644 --- a/k8s/index/job/save/configmap.yaml +++ b/k8s/index/job/save/configmap.yaml @@ -306,6 +306,7 @@ data: cache_enabled: true cache_expiration: 1h refresh_duration: 30m + network: tcp socket_option: ip_recover_destination_addr: false ip_transparent: false diff --git a/k8s/index/job/save/networkpolicy.yaml b/k8s/index/job/save/networkpolicy.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/manager/index/configmap.yaml b/k8s/manager/index/configmap.yaml index 5b6374ed5c6..dc325556e9b 100644 --- a/k8s/manager/index/configmap.yaml +++ b/k8s/manager/index/configmap.yaml @@ -304,6 +304,7 @@ data: cache_enabled: true cache_expiration: 1h refresh_duration: 30m + network: tcp socket_option: ip_recover_destination_addr: false ip_transparent: false diff --git a/k8s/manager/index/daemonset.yaml b/k8s/manager/index/daemonset.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/manager/index/deployment.yaml b/k8s/manager/index/deployment.yaml index 135c3d7070d..11e81cf4274 100644 --- a/k8s/manager/index/deployment.yaml +++ b/k8s/manager/index/deployment.yaml @@ -46,7 +46,7 @@ spec: app.kubernetes.io/instance: release-name app.kubernetes.io/component: manager-index annotations: - checksum/configmap: 0a58a9a201594a2afa98b16b0716b684a03269702de2690609a66710251c2b30 + checksum/configmap: f3baa2e31b4339536e8adfc395a9ef81906c592f02cf1ec0d892715a5313d7af profefe.com/enable: "true" profefe.com/port: "6060" profefe.com/service: vald-manager-index diff --git a/k8s/manager/index/networkpolicy.yaml b/k8s/manager/index/networkpolicy.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/k8s/manager/index/pdb.yaml b/k8s/manager/index/pdb.yaml index d5b5e7f3986..759d57caa1c 100644 --- a/k8s/manager/index/pdb.yaml +++ b/k8s/manager/index/pdb.yaml @@ -29,3 +29,4 @@ spec: selector: matchLabels: app: vald-manager-index + unhealthyPodEvictionPolicy: AlwaysAllow diff --git a/k8s/operator/helm/crds/valdrelease.yaml b/k8s/operator/helm/crds/valdrelease.yaml index 3469a37af50..024f1dc95d0 100644 --- a/k8s/operator/helm/crds/valdrelease.yaml +++ b/k8s/operator/helm/crds/valdrelease.yaml @@ -1273,6 +1273,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -2295,6 +2301,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -3171,6 +3183,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -4278,6 +4296,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -4477,6 +4501,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -4671,6 +4701,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -5783,6 +5819,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -5974,6 +6016,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -6167,6 +6215,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -7278,6 +7332,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -7376,6 +7436,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -8444,6 +8510,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -8635,6 +8707,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -8835,6 +8913,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -9747,6 +9831,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -9938,6 +10028,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -10888,6 +10984,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -11079,6 +11181,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -13011,6 +13119,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: @@ -13202,6 +13316,12 @@ spec: type: string refresh_duration: type: string + network: + type: string + enum: + - tcp + - udp + - unix socket_option: type: object properties: diff --git a/pkg/agent/core/faiss/config/config_test.go b/pkg/agent/core/faiss/config/config_test.go index aed7f2d1659..581f7e68d00 100644 --- a/pkg/agent/core/faiss/config/config_test.go +++ b/pkg/agent/core/faiss/config/config_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/handler/grpc/flush.go b/pkg/agent/core/faiss/handler/grpc/flush.go index 12985653513..2efc12b2682 100644 --- a/pkg/agent/core/faiss/handler/grpc/flush.go +++ b/pkg/agent/core/faiss/handler/grpc/flush.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/faiss/handler/grpc/flush_test.go b/pkg/agent/core/faiss/handler/grpc/flush_test.go index 37f0e730943..7cce3514065 100644 --- a/pkg/agent/core/faiss/handler/grpc/flush_test.go +++ b/pkg/agent/core/faiss/handler/grpc/flush_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/handler/grpc/handler_test.go b/pkg/agent/core/faiss/handler/grpc/handler_test.go index 70cc4d41732..9df3844c9ae 100644 --- a/pkg/agent/core/faiss/handler/grpc/handler_test.go +++ b/pkg/agent/core/faiss/handler/grpc/handler_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/handler/grpc/index_test.go b/pkg/agent/core/faiss/handler/grpc/index_test.go index 4b74453663f..070b7025072 100644 --- a/pkg/agent/core/faiss/handler/grpc/index_test.go +++ b/pkg/agent/core/faiss/handler/grpc/index_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/handler/grpc/insert_test.go b/pkg/agent/core/faiss/handler/grpc/insert_test.go index 7f40ec06357..2c2e5a47f9e 100644 --- a/pkg/agent/core/faiss/handler/grpc/insert_test.go +++ b/pkg/agent/core/faiss/handler/grpc/insert_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/handler/grpc/linear_search_test.go b/pkg/agent/core/faiss/handler/grpc/linear_search_test.go index e8fcddf8ec5..a96f07d051f 100644 --- a/pkg/agent/core/faiss/handler/grpc/linear_search_test.go +++ b/pkg/agent/core/faiss/handler/grpc/linear_search_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/handler/grpc/object_test.go b/pkg/agent/core/faiss/handler/grpc/object_test.go index 8cef7e4f3d1..c629fa4179b 100644 --- a/pkg/agent/core/faiss/handler/grpc/object_test.go +++ b/pkg/agent/core/faiss/handler/grpc/object_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/handler/grpc/option_test.go b/pkg/agent/core/faiss/handler/grpc/option_test.go index 14b2ebb109b..b25602ef66e 100644 --- a/pkg/agent/core/faiss/handler/grpc/option_test.go +++ b/pkg/agent/core/faiss/handler/grpc/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/handler/grpc/remove_test.go b/pkg/agent/core/faiss/handler/grpc/remove_test.go index 36ca0b68b9f..f06fbc79816 100644 --- a/pkg/agent/core/faiss/handler/grpc/remove_test.go +++ b/pkg/agent/core/faiss/handler/grpc/remove_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/handler/grpc/search_test.go b/pkg/agent/core/faiss/handler/grpc/search_test.go index 0c9f982e97f..da790995e0d 100644 --- a/pkg/agent/core/faiss/handler/grpc/search_test.go +++ b/pkg/agent/core/faiss/handler/grpc/search_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/handler/grpc/update_test.go b/pkg/agent/core/faiss/handler/grpc/update_test.go index 90d3ed9476f..908b1cc0efc 100644 --- a/pkg/agent/core/faiss/handler/grpc/update_test.go +++ b/pkg/agent/core/faiss/handler/grpc/update_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/handler/grpc/upsert_test.go b/pkg/agent/core/faiss/handler/grpc/upsert_test.go index dcbe0f2811f..7e11e04f3e8 100644 --- a/pkg/agent/core/faiss/handler/grpc/upsert_test.go +++ b/pkg/agent/core/faiss/handler/grpc/upsert_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/handler/rest/handler_test.go b/pkg/agent/core/faiss/handler/rest/handler_test.go index 4003db5eb96..e44a1924ec7 100644 --- a/pkg/agent/core/faiss/handler/rest/handler_test.go +++ b/pkg/agent/core/faiss/handler/rest/handler_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/handler/rest/option_test.go b/pkg/agent/core/faiss/handler/rest/option_test.go index 86d6885330d..e74fe590bd2 100644 --- a/pkg/agent/core/faiss/handler/rest/option_test.go +++ b/pkg/agent/core/faiss/handler/rest/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/router/option_test.go b/pkg/agent/core/faiss/router/option_test.go index 42e073651c2..91bbc265e96 100644 --- a/pkg/agent/core/faiss/router/option_test.go +++ b/pkg/agent/core/faiss/router/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/router/router_test.go b/pkg/agent/core/faiss/router/router_test.go index e9e3069588a..2fc44430413 100644 --- a/pkg/agent/core/faiss/router/router_test.go +++ b/pkg/agent/core/faiss/router/router_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/service/faiss_test.go b/pkg/agent/core/faiss/service/faiss_test.go index 8d730a5d3e0..7db985fdc83 100644 --- a/pkg/agent/core/faiss/service/faiss_test.go +++ b/pkg/agent/core/faiss/service/faiss_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/service/option_test.go b/pkg/agent/core/faiss/service/option_test.go index c9f4306b33e..c0fb76c8c37 100644 --- a/pkg/agent/core/faiss/service/option_test.go +++ b/pkg/agent/core/faiss/service/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/faiss/usecase/agentd_test.go b/pkg/agent/core/faiss/usecase/agentd_test.go index 1f71c705c1f..d79a481ce89 100644 --- a/pkg/agent/core/faiss/usecase/agentd_test.go +++ b/pkg/agent/core/faiss/usecase/agentd_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/ngt/handler/grpc/flush.go b/pkg/agent/core/ngt/handler/grpc/flush.go index a622b1d47e0..a3b076eac03 100644 --- a/pkg/agent/core/ngt/handler/grpc/flush.go +++ b/pkg/agent/core/ngt/handler/grpc/flush.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/flush_test.go b/pkg/agent/core/ngt/handler/grpc/flush_test.go index 0abe429c721..7465a766e49 100644 --- a/pkg/agent/core/ngt/handler/grpc/flush_test.go +++ b/pkg/agent/core/ngt/handler/grpc/flush_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/ngt/handler/grpc/index.go b/pkg/agent/core/ngt/handler/grpc/index.go index 8e7f24d9f64..6f1268c3438 100644 --- a/pkg/agent/core/ngt/handler/grpc/index.go +++ b/pkg/agent/core/ngt/handler/grpc/index.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/index_test.go b/pkg/agent/core/ngt/handler/grpc/index_test.go index 11407496aa3..6bb6bebbb3b 100644 --- a/pkg/agent/core/ngt/handler/grpc/index_test.go +++ b/pkg/agent/core/ngt/handler/grpc/index_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/insert.go b/pkg/agent/core/ngt/handler/grpc/insert.go index 17936786500..dfb692fe080 100644 --- a/pkg/agent/core/ngt/handler/grpc/insert.go +++ b/pkg/agent/core/ngt/handler/grpc/insert.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/insert_test.go b/pkg/agent/core/ngt/handler/grpc/insert_test.go index f03e7544765..cb0b291222a 100644 --- a/pkg/agent/core/ngt/handler/grpc/insert_test.go +++ b/pkg/agent/core/ngt/handler/grpc/insert_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/linear_search.go b/pkg/agent/core/ngt/handler/grpc/linear_search.go index d66f74e9d01..709e330838d 100644 --- a/pkg/agent/core/ngt/handler/grpc/linear_search.go +++ b/pkg/agent/core/ngt/handler/grpc/linear_search.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/linear_search_test.go b/pkg/agent/core/ngt/handler/grpc/linear_search_test.go index 85ecd233eb6..3d2a0866ed4 100644 --- a/pkg/agent/core/ngt/handler/grpc/linear_search_test.go +++ b/pkg/agent/core/ngt/handler/grpc/linear_search_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/ngt/handler/grpc/object.go b/pkg/agent/core/ngt/handler/grpc/object.go index 0207df97145..1a4ee5c926a 100644 --- a/pkg/agent/core/ngt/handler/grpc/object.go +++ b/pkg/agent/core/ngt/handler/grpc/object.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/object_test.go b/pkg/agent/core/ngt/handler/grpc/object_test.go index 6ab2f52a9d8..461a499982f 100644 --- a/pkg/agent/core/ngt/handler/grpc/object_test.go +++ b/pkg/agent/core/ngt/handler/grpc/object_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/remove.go b/pkg/agent/core/ngt/handler/grpc/remove.go index 2d3ec18b100..ced086ba12a 100644 --- a/pkg/agent/core/ngt/handler/grpc/remove.go +++ b/pkg/agent/core/ngt/handler/grpc/remove.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/remove_test.go b/pkg/agent/core/ngt/handler/grpc/remove_test.go index 92732f8e9ba..0ff6abce6ad 100644 --- a/pkg/agent/core/ngt/handler/grpc/remove_test.go +++ b/pkg/agent/core/ngt/handler/grpc/remove_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/search.go b/pkg/agent/core/ngt/handler/grpc/search.go index 119a4bc7279..1f5e49d2ed7 100644 --- a/pkg/agent/core/ngt/handler/grpc/search.go +++ b/pkg/agent/core/ngt/handler/grpc/search.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/search_test.go b/pkg/agent/core/ngt/handler/grpc/search_test.go index 1ef340e2c45..72af851b1b5 100644 --- a/pkg/agent/core/ngt/handler/grpc/search_test.go +++ b/pkg/agent/core/ngt/handler/grpc/search_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/update.go b/pkg/agent/core/ngt/handler/grpc/update.go index a38307654cc..05cef95a629 100644 --- a/pkg/agent/core/ngt/handler/grpc/update.go +++ b/pkg/agent/core/ngt/handler/grpc/update.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/update_test.go b/pkg/agent/core/ngt/handler/grpc/update_test.go index 38bf394e4af..1cb79f90a2d 100644 --- a/pkg/agent/core/ngt/handler/grpc/update_test.go +++ b/pkg/agent/core/ngt/handler/grpc/update_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/upsert.go b/pkg/agent/core/ngt/handler/grpc/upsert.go index 6c75e4ecec7..c459b926079 100644 --- a/pkg/agent/core/ngt/handler/grpc/upsert.go +++ b/pkg/agent/core/ngt/handler/grpc/upsert.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/grpc/upsert_test.go b/pkg/agent/core/ngt/handler/grpc/upsert_test.go index 90e671f698c..c91fb0e28ad 100644 --- a/pkg/agent/core/ngt/handler/grpc/upsert_test.go +++ b/pkg/agent/core/ngt/handler/grpc/upsert_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/agent/core/ngt/handler/rest/handler_test.go b/pkg/agent/core/ngt/handler/rest/handler_test.go index 4003db5eb96..e44a1924ec7 100644 --- a/pkg/agent/core/ngt/handler/rest/handler_test.go +++ b/pkg/agent/core/ngt/handler/rest/handler_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/core/ngt/handler/rest/option_test.go b/pkg/agent/core/ngt/handler/rest/option_test.go index 86d6885330d..e74fe590bd2 100644 --- a/pkg/agent/core/ngt/handler/rest/option_test.go +++ b/pkg/agent/core/ngt/handler/rest/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/internal/memstore/data_manager_test.go b/pkg/agent/internal/memstore/data_manager_test.go index 3c4450bdfcd..5d7f2d6440c 100644 --- a/pkg/agent/internal/memstore/data_manager_test.go +++ b/pkg/agent/internal/memstore/data_manager_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package memstore // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/sidecar/handler/rest/handler_test.go b/pkg/agent/sidecar/handler/rest/handler_test.go index 171e5173900..94a3cb46a4e 100644 --- a/pkg/agent/sidecar/handler/rest/handler_test.go +++ b/pkg/agent/sidecar/handler/rest/handler_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/sidecar/handler/rest/option_test.go b/pkg/agent/sidecar/handler/rest/option_test.go index 06236a571ef..e03dbe5fbf8 100644 --- a/pkg/agent/sidecar/handler/rest/option_test.go +++ b/pkg/agent/sidecar/handler/rest/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/sidecar/router/option_test.go b/pkg/agent/sidecar/router/option_test.go index c39d90a7bc4..3c767e34be9 100644 --- a/pkg/agent/sidecar/router/option_test.go +++ b/pkg/agent/sidecar/router/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/agent/sidecar/router/router_test.go b/pkg/agent/sidecar/router/router_test.go index e9e3069588a..2fc44430413 100644 --- a/pkg/agent/sidecar/router/router_test.go +++ b/pkg/agent/sidecar/router/router_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/discoverer/k8s/handler/rest/handler_test.go b/pkg/discoverer/k8s/handler/rest/handler_test.go index f48f4ac75c0..c4459bca704 100644 --- a/pkg/discoverer/k8s/handler/rest/handler_test.go +++ b/pkg/discoverer/k8s/handler/rest/handler_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/discoverer/k8s/handler/rest/option_test.go b/pkg/discoverer/k8s/handler/rest/option_test.go index 4a315bbd7b9..16a0f24d82d 100644 --- a/pkg/discoverer/k8s/handler/rest/option_test.go +++ b/pkg/discoverer/k8s/handler/rest/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/discoverer/k8s/router/option_test.go b/pkg/discoverer/k8s/router/option_test.go index 42e073651c2..91bbc265e96 100644 --- a/pkg/discoverer/k8s/router/option_test.go +++ b/pkg/discoverer/k8s/router/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/discoverer/k8s/router/router_test.go b/pkg/discoverer/k8s/router/router_test.go index e9e3069588a..2fc44430413 100644 --- a/pkg/discoverer/k8s/router/router_test.go +++ b/pkg/discoverer/k8s/router/router_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/discoverer/k8s/service/discover.go b/pkg/discoverer/k8s/service/discover.go index c95b02420dd..864860af260 100644 --- a/pkg/discoverer/k8s/service/discover.go +++ b/pkg/discoverer/k8s/service/discover.go @@ -55,11 +55,11 @@ type discoverer struct { pods sync.Map[string, *[]pod.Pod] podMetrics sync.Map[string, mpod.Pod] services sync.Map[string, *service.Service] - podsByNode atomic.Value - podsByNamespace atomic.Value - podsByName atomic.Value - nodeByName atomic.Value - svcsByName atomic.Value + podsByNode atomic.Pointer[map[string]map[string]map[string][]*payload.Info_Pod] + podsByNamespace atomic.Pointer[map[string]map[string][]*payload.Info_Pod] + podsByName atomic.Pointer[map[string][]*payload.Info_Pod] + nodeByName atomic.Pointer[map[string]*payload.Info_Node] + svcsByName atomic.Pointer[map[string]*payload.Info_Service] ctrl k8s.Controller namespace string name string @@ -77,11 +77,18 @@ func New(selector *config.Selectors, opts ...Option) (dsc Discoverer, err error) return nil, errors.ErrOptionFailed(err, reflect.ValueOf(opt)) } } - - d.podsByNode.Store(make(map[string]map[string]map[string][]*payload.Info_Pod)) - d.podsByNamespace.Store(make(map[string]map[string][]*payload.Info_Pod)) - d.podsByName.Store(make(map[string][]*payload.Info_Pod)) - d.nodeByName.Store(make(map[string]*payload.Info_Node)) + var ( + podsByNode = make(map[string]map[string]map[string][]*payload.Info_Pod) // map[node][namespace][name][]pod + podsByNamespace = make(map[string]map[string][]*payload.Info_Pod) // map[namespace][name][]pod + podsByName = make(map[string][]*payload.Info_Pod) // map[name][]pod + nodeByName = make(map[string]*payload.Info_Node) // map[name]node + svcsByName = make(map[string]*payload.Info_Service) // map[name]svc + ) + d.podsByNode.Store(&podsByNode) + d.podsByNamespace.Store(&podsByNamespace) + d.podsByName.Store(&podsByName) + d.nodeByName.Store(&nodeByName) + d.svcsByName.Store(&svcsByName) var k8sOpts []k8s.Option k8sOpts = append(k8sOpts, @@ -365,7 +372,7 @@ func (d *discoverer) Start(ctx context.Context) (<-chan error, error) { return true } }) - d.svcsByName.Store(svcsByName) + d.svcsByName.Store(&svcsByName) var wg sync.WaitGroup wg.Add(1) @@ -407,8 +414,8 @@ func (d *discoverer) Start(ctx context.Context) (<-chan error, error) { nodeByName[nodeName].GetPods().Pods = p } } - d.nodeByName.Store(nodeByName) - d.podsByNode.Store(podsByNode) + d.nodeByName.Store(&nodeByName) + d.podsByNode.Store(&podsByNode) return nil })) wg.Add(1) @@ -422,7 +429,7 @@ func (d *discoverer) Start(ctx context.Context) (<-chan error, error) { podsByNamespace[namespace][appName] = p } } - d.podsByNamespace.Store(podsByNamespace) + d.podsByNamespace.Store(&podsByNamespace) return nil })) wg.Add(1) @@ -434,7 +441,7 @@ func (d *discoverer) Start(ctx context.Context) (<-chan error, error) { }) podsByName[appName] = p } - d.podsByName.Store(podsByName) + d.podsByName.Store(&podsByName) return nil })) wg.Wait() @@ -456,8 +463,8 @@ func (d *discoverer) GetPods(req *payload.Discoverer_Request) (pods *payload.Inf ) pods = new(payload.Info_Pods) if req.GetNode() != "" && req.GetNode() != "*" { - pbn, ok := d.podsByNode.Load().(map[string]map[string]map[string][]*payload.Info_Pod) - if !ok { + pbn := *d.podsByNode.Load() + if pbn == nil { return nil, errors.ErrInvalidDiscoveryCache } podsByNamespace, ok = pbn[req.GetNode()] @@ -467,8 +474,8 @@ func (d *discoverer) GetPods(req *payload.Discoverer_Request) (pods *payload.Inf } if req.GetNamespace() != "" && req.GetNamespace() != "*" { if podsByNamespace == nil { - podsByNamespace, ok = d.podsByNamespace.Load().(map[string]map[string][]*payload.Info_Pod) - if !ok { + podsByNamespace = *d.podsByNamespace.Load() + if podsByNamespace == nil { return nil, errors.ErrInvalidDiscoveryCache } } @@ -486,8 +493,8 @@ func (d *discoverer) GetPods(req *payload.Discoverer_Request) (pods *payload.Inf } } } else { - podsByName, ok = d.podsByName.Load().(map[string][]*payload.Info_Pod) - if !ok { + podsByName = *d.podsByName.Load() + if podsByName == nil { return nil, errors.ErrInvalidDiscoveryCache } } @@ -507,15 +514,17 @@ func (d *discoverer) GetPods(req *payload.Discoverer_Request) (pods *payload.Inf pods.GetPods()[i].GetNode().Pods = nil } } + slices.SortFunc(pods.Pods, func(left, right *payload.Info_Pod) int { + return cmp.Compare(left.GetMemory().GetUsage(), right.GetMemory().GetUsage()) + }) return pods, nil } func (d *discoverer) GetNodes( req *payload.Discoverer_Request, ) (nodes *payload.Info_Nodes, err error) { - nodes = new(payload.Info_Nodes) - nbn, ok := d.nodeByName.Load().(map[string]*payload.Info_Node) - if !ok { + nbn := *d.nodeByName.Load() + if nbn == nil { return nil, errors.ErrInvalidDiscoveryCache } if req.GetNode() != "" && req.GetNode() != "*" { @@ -527,10 +536,15 @@ func (d *discoverer) GetNodes( if err == nil { n.Pods = ps } - nodes.Nodes = append(nodes.GetNodes(), n) - return nodes, nil + return &payload.Info_Nodes{ + Nodes: []*payload.Info_Node{ + n, + }, + }, nil + } + nodes = &payload.Info_Nodes{ + Nodes: make([]*payload.Info_Node, 0, len(nbn)), } - ns := nodes.Nodes for name, n := range nbn { req.Node = name if n.GetPods() != nil { @@ -546,13 +560,11 @@ func (d *discoverer) GetNodes( n.Pods = ps } } - ns = append(ns, n) + nodes.Nodes = append(nodes.Nodes, n) } - slices.SortFunc(ns, func(left, right *payload.Info_Node) int { + slices.SortFunc(nodes.Nodes, func(left, right *payload.Info_Node) int { return cmp.Compare(left.GetMemory().GetUsage(), right.GetMemory().GetUsage()) }) - - nodes.Nodes = ns return nodes, nil } @@ -561,8 +573,8 @@ func (d *discoverer) GetServices( req *payload.Discoverer_Request, ) (svcs *payload.Info_Services, err error) { svcs = new(payload.Info_Services) - sbn, ok := d.svcsByName.Load().(map[string]*payload.Info_Service) - if !ok { + sbn := *d.svcsByName.Load() + if sbn == nil { return nil, errors.ErrInvalidDiscoveryCache } diff --git a/pkg/gateway/filter/handler/rest/handler_test.go b/pkg/gateway/filter/handler/rest/handler_test.go index b12992a9322..3a9af38c741 100644 --- a/pkg/gateway/filter/handler/rest/handler_test.go +++ b/pkg/gateway/filter/handler/rest/handler_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/filter/handler/rest/option_test.go b/pkg/gateway/filter/handler/rest/option_test.go index 45a06ff42ad..6ef8042e52d 100644 --- a/pkg/gateway/filter/handler/rest/option_test.go +++ b/pkg/gateway/filter/handler/rest/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/filter/router/option_test.go b/pkg/gateway/filter/router/option_test.go index c39d90a7bc4..3c767e34be9 100644 --- a/pkg/gateway/filter/router/option_test.go +++ b/pkg/gateway/filter/router/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/filter/router/router_test.go b/pkg/gateway/filter/router/router_test.go index e9e3069588a..2fc44430413 100644 --- a/pkg/gateway/filter/router/router_test.go +++ b/pkg/gateway/filter/router/router_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/lb/handler/grpc/aggregation.go b/pkg/gateway/lb/handler/grpc/aggregation.go index eb4addd84bb..6f250d1c8a0 100644 --- a/pkg/gateway/lb/handler/grpc/aggregation.go +++ b/pkg/gateway/lb/handler/grpc/aggregation.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/gateway/lb/handler/grpc/aggregation_test.go b/pkg/gateway/lb/handler/grpc/aggregation_test.go index 083d0b42cbf..ec9441bc1f7 100644 --- a/pkg/gateway/lb/handler/grpc/aggregation_test.go +++ b/pkg/gateway/lb/handler/grpc/aggregation_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/lb/handler/grpc/handler_test.go b/pkg/gateway/lb/handler/grpc/handler_test.go index 252af51abbb..92d9b8105ca 100644 --- a/pkg/gateway/lb/handler/grpc/handler_test.go +++ b/pkg/gateway/lb/handler/grpc/handler_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/lb/handler/grpc/option_test.go b/pkg/gateway/lb/handler/grpc/option_test.go index 286f34c4576..c54839ea932 100644 --- a/pkg/gateway/lb/handler/grpc/option_test.go +++ b/pkg/gateway/lb/handler/grpc/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/lb/handler/grpc/pairing_heap.go b/pkg/gateway/lb/handler/grpc/pairing_heap.go index 41bad59a15d..ec2f4f7c7cf 100644 --- a/pkg/gateway/lb/handler/grpc/pairing_heap.go +++ b/pkg/gateway/lb/handler/grpc/pairing_heap.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc type PairingHeap struct { diff --git a/pkg/gateway/lb/handler/grpc/pairing_heap_test.go b/pkg/gateway/lb/handler/grpc/pairing_heap_test.go index 3e83ee133ed..bdea65c3fed 100644 --- a/pkg/gateway/lb/handler/grpc/pairing_heap_test.go +++ b/pkg/gateway/lb/handler/grpc/pairing_heap_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/gateway/lb/handler/grpc/search_benchmark_test.go b/pkg/gateway/lb/handler/grpc/search_benchmark_test.go index 06a2287980c..d8e564fb926 100644 --- a/pkg/gateway/lb/handler/grpc/search_benchmark_test.go +++ b/pkg/gateway/lb/handler/grpc/search_benchmark_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/gateway/lb/handler/rest/handler_test.go b/pkg/gateway/lb/handler/rest/handler_test.go index 07699533f91..34e1a15f5f0 100644 --- a/pkg/gateway/lb/handler/rest/handler_test.go +++ b/pkg/gateway/lb/handler/rest/handler_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/lb/handler/rest/option_test.go b/pkg/gateway/lb/handler/rest/option_test.go index dda27221fd8..f1c404325b6 100644 --- a/pkg/gateway/lb/handler/rest/option_test.go +++ b/pkg/gateway/lb/handler/rest/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/lb/router/option_test.go b/pkg/gateway/lb/router/option_test.go index c39d90a7bc4..3c767e34be9 100644 --- a/pkg/gateway/lb/router/option_test.go +++ b/pkg/gateway/lb/router/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/lb/router/router_test.go b/pkg/gateway/lb/router/router_test.go index e9e3069588a..2fc44430413 100644 --- a/pkg/gateway/lb/router/router_test.go +++ b/pkg/gateway/lb/router/router_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/mirror/config/config.go b/pkg/gateway/mirror/config/config.go index 8528da24c03..e2b7dc264a7 100644 --- a/pkg/gateway/mirror/config/config.go +++ b/pkg/gateway/mirror/config/config.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config import ( diff --git a/pkg/gateway/mirror/config/config_test.go b/pkg/gateway/mirror/config/config_test.go index aed7f2d1659..581f7e68d00 100644 --- a/pkg/gateway/mirror/config/config_test.go +++ b/pkg/gateway/mirror/config/config_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/mirror/handler/doc.go b/pkg/gateway/mirror/handler/doc.go index 75fbe952460..ee49d4de458 100644 --- a/pkg/gateway/mirror/handler/doc.go +++ b/pkg/gateway/mirror/handler/doc.go @@ -1,14 +1,16 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package handler diff --git a/pkg/gateway/mirror/handler/grpc/handler.go b/pkg/gateway/mirror/handler/grpc/handler.go index 847aaac933f..b88d511b330 100644 --- a/pkg/gateway/mirror/handler/grpc/handler.go +++ b/pkg/gateway/mirror/handler/grpc/handler.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/gateway/mirror/handler/grpc/handler_test.go b/pkg/gateway/mirror/handler/grpc/handler_test.go index 569a4a1f384..58bdd03f4cd 100644 --- a/pkg/gateway/mirror/handler/grpc/handler_test.go +++ b/pkg/gateway/mirror/handler/grpc/handler_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/gateway/mirror/handler/grpc/mock_test.go b/pkg/gateway/mirror/handler/grpc/mock_test.go index cc14471d7fd..69062cd2d45 100644 --- a/pkg/gateway/mirror/handler/grpc/mock_test.go +++ b/pkg/gateway/mirror/handler/grpc/mock_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/gateway/mirror/handler/grpc/option.go b/pkg/gateway/mirror/handler/grpc/option.go index e2d14869db0..6a7f9987dd7 100644 --- a/pkg/gateway/mirror/handler/grpc/option.go +++ b/pkg/gateway/mirror/handler/grpc/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc import ( diff --git a/pkg/gateway/mirror/handler/grpc/option_test.go b/pkg/gateway/mirror/handler/grpc/option_test.go index f9e46989759..76209ac1143 100644 --- a/pkg/gateway/mirror/handler/grpc/option_test.go +++ b/pkg/gateway/mirror/handler/grpc/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/mirror/handler/rest/handler.go b/pkg/gateway/mirror/handler/rest/handler.go index 777938a4ee1..5f91c5e1d84 100644 --- a/pkg/gateway/mirror/handler/rest/handler.go +++ b/pkg/gateway/mirror/handler/rest/handler.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest import ( diff --git a/pkg/gateway/mirror/handler/rest/handler_test.go b/pkg/gateway/mirror/handler/rest/handler_test.go index fde26792e20..52ce3cbcba9 100644 --- a/pkg/gateway/mirror/handler/rest/handler_test.go +++ b/pkg/gateway/mirror/handler/rest/handler_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/mirror/handler/rest/option.go b/pkg/gateway/mirror/handler/rest/option.go index f2287b16ebc..ad4a1ea6add 100644 --- a/pkg/gateway/mirror/handler/rest/option.go +++ b/pkg/gateway/mirror/handler/rest/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest import "github.com/vdaas/vald/pkg/gateway/mirror/handler/grpc" diff --git a/pkg/gateway/mirror/handler/rest/option_test.go b/pkg/gateway/mirror/handler/rest/option_test.go index bb925a0d1d5..ac78f27d058 100644 --- a/pkg/gateway/mirror/handler/rest/option_test.go +++ b/pkg/gateway/mirror/handler/rest/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/mirror/router/option.go b/pkg/gateway/mirror/router/option.go index ce38a5e3b3f..6c3d4730f57 100644 --- a/pkg/gateway/mirror/router/option.go +++ b/pkg/gateway/mirror/router/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router import "github.com/vdaas/vald/pkg/gateway/mirror/handler/rest" diff --git a/pkg/gateway/mirror/router/option_test.go b/pkg/gateway/mirror/router/option_test.go index c39d90a7bc4..3c767e34be9 100644 --- a/pkg/gateway/mirror/router/option_test.go +++ b/pkg/gateway/mirror/router/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/mirror/router/router.go b/pkg/gateway/mirror/router/router.go index d65b1066522..144d770ec78 100644 --- a/pkg/gateway/mirror/router/router.go +++ b/pkg/gateway/mirror/router/router.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router import ( diff --git a/pkg/gateway/mirror/router/router_test.go b/pkg/gateway/mirror/router/router_test.go index e9e3069588a..2fc44430413 100644 --- a/pkg/gateway/mirror/router/router_test.go +++ b/pkg/gateway/mirror/router/router_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/mirror/service/discovery.go b/pkg/gateway/mirror/service/discovery.go index 43c2929d302..5519ec19a9c 100644 --- a/pkg/gateway/mirror/service/discovery.go +++ b/pkg/gateway/mirror/service/discovery.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/gateway/mirror/service/discovery_option.go b/pkg/gateway/mirror/service/discovery_option.go index f43ec58c823..12f4031ef8f 100644 --- a/pkg/gateway/mirror/service/discovery_option.go +++ b/pkg/gateway/mirror/service/discovery_option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/gateway/mirror/service/discovery_option_test.go b/pkg/gateway/mirror/service/discovery_option_test.go index 5dc9a78ddff..c53e15e6882 100644 --- a/pkg/gateway/mirror/service/discovery_option_test.go +++ b/pkg/gateway/mirror/service/discovery_option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/mirror/service/discovery_test.go b/pkg/gateway/mirror/service/discovery_test.go index f2242c2ce25..1e59889b122 100644 --- a/pkg/gateway/mirror/service/discovery_test.go +++ b/pkg/gateway/mirror/service/discovery_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/gateway/mirror/service/doc.go b/pkg/gateway/mirror/service/doc.go index d65bc598687..b3d128239a2 100644 --- a/pkg/gateway/mirror/service/doc.go +++ b/pkg/gateway/mirror/service/doc.go @@ -1,14 +1,16 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service diff --git a/pkg/gateway/mirror/service/gateway.go b/pkg/gateway/mirror/service/gateway.go index 6d708b91ad3..891cc983f8d 100644 --- a/pkg/gateway/mirror/service/gateway.go +++ b/pkg/gateway/mirror/service/gateway.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/gateway/mirror/service/gateway_mock_test.go b/pkg/gateway/mirror/service/gateway_mock_test.go index d0c8c924f9b..669ae57247e 100644 --- a/pkg/gateway/mirror/service/gateway_mock_test.go +++ b/pkg/gateway/mirror/service/gateway_mock_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/gateway/mirror/service/gateway_test.go b/pkg/gateway/mirror/service/gateway_test.go index ed534430401..285ff67a5eb 100644 --- a/pkg/gateway/mirror/service/gateway_test.go +++ b/pkg/gateway/mirror/service/gateway_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/mirror/service/mirror.go b/pkg/gateway/mirror/service/mirror.go index 773e43035df..a31ba9cf050 100644 --- a/pkg/gateway/mirror/service/mirror.go +++ b/pkg/gateway/mirror/service/mirror.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/gateway/mirror/service/mirror_mock_test.go b/pkg/gateway/mirror/service/mirror_mock_test.go index 56d828b3058..4b533d4860e 100644 --- a/pkg/gateway/mirror/service/mirror_mock_test.go +++ b/pkg/gateway/mirror/service/mirror_mock_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/gateway/mirror/service/mirror_option.go b/pkg/gateway/mirror/service/mirror_option.go index ed605911eb1..84a213beac8 100644 --- a/pkg/gateway/mirror/service/mirror_option.go +++ b/pkg/gateway/mirror/service/mirror_option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/gateway/mirror/service/mirror_option_test.go b/pkg/gateway/mirror/service/mirror_option_test.go index 2b84c32ee00..d6b1f69d2b3 100644 --- a/pkg/gateway/mirror/service/mirror_option_test.go +++ b/pkg/gateway/mirror/service/mirror_option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/mirror/service/mirror_test.go b/pkg/gateway/mirror/service/mirror_test.go index b96211d8872..25fa130359a 100644 --- a/pkg/gateway/mirror/service/mirror_test.go +++ b/pkg/gateway/mirror/service/mirror_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/gateway/mirror/service/option.go b/pkg/gateway/mirror/service/option.go index 6408cf9fcd6..dba20f7b290 100644 --- a/pkg/gateway/mirror/service/option.go +++ b/pkg/gateway/mirror/service/option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/gateway/mirror/service/option_test.go b/pkg/gateway/mirror/service/option_test.go index b3e47b14910..1653794edf5 100644 --- a/pkg/gateway/mirror/service/option_test.go +++ b/pkg/gateway/mirror/service/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/gateway/mirror/usecase/vald.go b/pkg/gateway/mirror/usecase/vald.go index 3c1274cc3ea..fe4f96552a8 100644 --- a/pkg/gateway/mirror/usecase/vald.go +++ b/pkg/gateway/mirror/usecase/vald.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase import ( diff --git a/pkg/gateway/mirror/usecase/vald_test.go b/pkg/gateway/mirror/usecase/vald_test.go index 9dcd59e1367..c7771d342ee 100644 --- a/pkg/gateway/mirror/usecase/vald_test.go +++ b/pkg/gateway/mirror/usecase/vald_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase // NOT IMPLEMENTED BELOW diff --git a/pkg/index/job/correction/config/config_test.go b/pkg/index/job/correction/config/config_test.go index aed7f2d1659..581f7e68d00 100644 --- a/pkg/index/job/correction/config/config_test.go +++ b/pkg/index/job/correction/config/config_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/pkg/index/job/correction/service/corrector.go b/pkg/index/job/correction/service/corrector.go index d403551c5e0..04ac3c9adde 100644 --- a/pkg/index/job/correction/service/corrector.go +++ b/pkg/index/job/correction/service/corrector.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/index/job/correction/service/corrector_test.go b/pkg/index/job/correction/service/corrector_test.go index 3e905316fd7..6ee1467801c 100644 --- a/pkg/index/job/correction/service/corrector_test.go +++ b/pkg/index/job/correction/service/corrector_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/index/job/correction/service/options.go b/pkg/index/job/correction/service/options.go index c378c85deeb..89736e978b2 100644 --- a/pkg/index/job/correction/service/options.go +++ b/pkg/index/job/correction/service/options.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/index/job/correction/service/options_test.go b/pkg/index/job/correction/service/options_test.go index b9c4213c1a8..ff09fde6656 100644 --- a/pkg/index/job/correction/service/options_test.go +++ b/pkg/index/job/correction/service/options_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/index/job/correction/usecase/corrector.go b/pkg/index/job/correction/usecase/corrector.go index 5bf3b6b267d..c4a1dd28809 100644 --- a/pkg/index/job/correction/usecase/corrector.go +++ b/pkg/index/job/correction/usecase/corrector.go @@ -1,22 +1,23 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase import ( "context" "os" - "slices" "syscall" "time" @@ -86,10 +87,6 @@ func New(cfg *config.Data) (r runner.Runner, err error) { discoverer.WithDiscoverDuration(cfg.Corrector.Discoverer.Duration), discoverer.WithOptions(acOpts...), discoverer.WithNodeName(cfg.Corrector.NodeName), - discoverer.WithOnDiscoverFunc(func(_ context.Context, _ discoverer.Client, addrs []string) error { - slices.Reverse(addrs) - return nil - }), ) if err != nil { return nil, err diff --git a/pkg/index/job/correction/usecase/corrector_test.go b/pkg/index/job/correction/usecase/corrector_test.go index fbb7300578e..1007358a8cf 100644 --- a/pkg/index/job/correction/usecase/corrector_test.go +++ b/pkg/index/job/correction/usecase/corrector_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase // NOT IMPLEMENTED BELOW diff --git a/pkg/index/job/creation/config/config.go b/pkg/index/job/creation/config/config.go index 95856eb9d6b..59f91e221ba 100644 --- a/pkg/index/job/creation/config/config.go +++ b/pkg/index/job/creation/config/config.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config import ( diff --git a/pkg/index/job/creation/config/config_test.go b/pkg/index/job/creation/config/config_test.go index aed7f2d1659..581f7e68d00 100644 --- a/pkg/index/job/creation/config/config_test.go +++ b/pkg/index/job/creation/config/config_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/pkg/index/job/creation/service/indexer.go b/pkg/index/job/creation/service/indexer.go index 1ee74b3adea..4825bddb181 100644 --- a/pkg/index/job/creation/service/indexer.go +++ b/pkg/index/job/creation/service/indexer.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/index/job/creation/service/indexer_test.go b/pkg/index/job/creation/service/indexer_test.go index 6e67e4e7699..cbf6b497ccd 100644 --- a/pkg/index/job/creation/service/indexer_test.go +++ b/pkg/index/job/creation/service/indexer_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/index/job/creation/service/options.go b/pkg/index/job/creation/service/options.go index 9f144d63ac0..31a6aa604d0 100644 --- a/pkg/index/job/creation/service/options.go +++ b/pkg/index/job/creation/service/options.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/index/job/creation/service/options_test.go b/pkg/index/job/creation/service/options_test.go index 250bab2f1ac..9ad5d6a51dc 100644 --- a/pkg/index/job/creation/service/options_test.go +++ b/pkg/index/job/creation/service/options_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/index/job/creation/usecase/creation.go b/pkg/index/job/creation/usecase/creation.go index cc595b7878e..4eecd6de57d 100644 --- a/pkg/index/job/creation/usecase/creation.go +++ b/pkg/index/job/creation/usecase/creation.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase import ( diff --git a/pkg/index/job/creation/usecase/creation_test.go b/pkg/index/job/creation/usecase/creation_test.go index a870303ca61..8d32f29459d 100644 --- a/pkg/index/job/creation/usecase/creation_test.go +++ b/pkg/index/job/creation/usecase/creation_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase // NOT IMPLEMENTED BELOW diff --git a/pkg/index/job/deletion/config/config.go b/pkg/index/job/deletion/config/config.go index 3528abd4fb6..fb3ad3161d9 100644 --- a/pkg/index/job/deletion/config/config.go +++ b/pkg/index/job/deletion/config/config.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config import ( diff --git a/pkg/index/job/deletion/service/deleter.go b/pkg/index/job/deletion/service/deleter.go index 9573e8d9fde..1e2ca2aaa3a 100644 --- a/pkg/index/job/deletion/service/deleter.go +++ b/pkg/index/job/deletion/service/deleter.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/index/job/deletion/service/options.go b/pkg/index/job/deletion/service/options.go index 05103e1eff8..9f9d78f2353 100644 --- a/pkg/index/job/deletion/service/options.go +++ b/pkg/index/job/deletion/service/options.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/index/job/deletion/usecase/deletion.go b/pkg/index/job/deletion/usecase/deletion.go index 84302c10673..4935dc94ffe 100644 --- a/pkg/index/job/deletion/usecase/deletion.go +++ b/pkg/index/job/deletion/usecase/deletion.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase import ( diff --git a/pkg/index/job/readreplica/rotate/config/config.go b/pkg/index/job/readreplica/rotate/config/config.go index be17a970f28..a8715fb0bb7 100644 --- a/pkg/index/job/readreplica/rotate/config/config.go +++ b/pkg/index/job/readreplica/rotate/config/config.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config import ( diff --git a/pkg/index/job/readreplica/rotate/config/config_test.go b/pkg/index/job/readreplica/rotate/config/config_test.go index aed7f2d1659..581f7e68d00 100644 --- a/pkg/index/job/readreplica/rotate/config/config_test.go +++ b/pkg/index/job/readreplica/rotate/config/config_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/pkg/index/job/readreplica/rotate/service/options.go b/pkg/index/job/readreplica/rotate/service/options.go index c5c0a79cea4..3a40779b587 100644 --- a/pkg/index/job/readreplica/rotate/service/options.go +++ b/pkg/index/job/readreplica/rotate/service/options.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // Option represents the functional option for index. diff --git a/pkg/index/job/readreplica/rotate/service/options_test.go b/pkg/index/job/readreplica/rotate/service/options_test.go index e9e9aacf861..e9338640b51 100644 --- a/pkg/index/job/readreplica/rotate/service/options_test.go +++ b/pkg/index/job/readreplica/rotate/service/options_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/index/job/readreplica/rotate/service/rotator.go b/pkg/index/job/readreplica/rotate/service/rotator.go index a57c7ecbfaa..24d43e845c1 100644 --- a/pkg/index/job/readreplica/rotate/service/rotator.go +++ b/pkg/index/job/readreplica/rotate/service/rotator.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/index/job/readreplica/rotate/service/rotator_test.go b/pkg/index/job/readreplica/rotate/service/rotator_test.go index f6f7bda6c0c..f5031a04ae8 100644 --- a/pkg/index/job/readreplica/rotate/service/rotator_test.go +++ b/pkg/index/job/readreplica/rotate/service/rotator_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/index/job/readreplica/rotate/usecase/rotate.go b/pkg/index/job/readreplica/rotate/usecase/rotate.go index 6f4436bf843..880b4ba8483 100644 --- a/pkg/index/job/readreplica/rotate/usecase/rotate.go +++ b/pkg/index/job/readreplica/rotate/usecase/rotate.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase import ( diff --git a/pkg/index/job/readreplica/rotate/usecase/rotate_test.go b/pkg/index/job/readreplica/rotate/usecase/rotate_test.go index 9e50824c5f6..43971523d06 100644 --- a/pkg/index/job/readreplica/rotate/usecase/rotate_test.go +++ b/pkg/index/job/readreplica/rotate/usecase/rotate_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase // NOT IMPLEMENTED BELOW diff --git a/pkg/index/job/save/config/config.go b/pkg/index/job/save/config/config.go index ff2b1e6a3dc..ee9fcd23f23 100644 --- a/pkg/index/job/save/config/config.go +++ b/pkg/index/job/save/config/config.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config import ( diff --git a/pkg/index/job/save/config/config_test.go b/pkg/index/job/save/config/config_test.go index aed7f2d1659..581f7e68d00 100644 --- a/pkg/index/job/save/config/config_test.go +++ b/pkg/index/job/save/config/config_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/pkg/index/job/save/service/indexer.go b/pkg/index/job/save/service/indexer.go index f1e4682873c..78b144b3d06 100644 --- a/pkg/index/job/save/service/indexer.go +++ b/pkg/index/job/save/service/indexer.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/index/job/save/service/indexer_test.go b/pkg/index/job/save/service/indexer_test.go index b1d98816256..6ffcfb04e36 100644 --- a/pkg/index/job/save/service/indexer_test.go +++ b/pkg/index/job/save/service/indexer_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/index/job/save/service/options.go b/pkg/index/job/save/service/options.go index 6b972631bd0..c7ce432c4c2 100644 --- a/pkg/index/job/save/service/options.go +++ b/pkg/index/job/save/service/options.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/index/job/save/service/options_test.go b/pkg/index/job/save/service/options_test.go index b7d52a3725d..c7fb2d581f7 100644 --- a/pkg/index/job/save/service/options_test.go +++ b/pkg/index/job/save/service/options_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/index/job/save/usecase/save.go b/pkg/index/job/save/usecase/save.go index a1552395cd2..23a24cbdb99 100644 --- a/pkg/index/job/save/usecase/save.go +++ b/pkg/index/job/save/usecase/save.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase import ( diff --git a/pkg/index/job/save/usecase/save_test.go b/pkg/index/job/save/usecase/save_test.go index a870303ca61..8d32f29459d 100644 --- a/pkg/index/job/save/usecase/save_test.go +++ b/pkg/index/job/save/usecase/save_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase // NOT IMPLEMENTED BELOW diff --git a/pkg/index/operator/config/config.go b/pkg/index/operator/config/config.go index fcf0eb47001..d00eaff20ee 100644 --- a/pkg/index/operator/config/config.go +++ b/pkg/index/operator/config/config.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config import ( diff --git a/pkg/index/operator/config/config_test.go b/pkg/index/operator/config/config_test.go index aed7f2d1659..581f7e68d00 100644 --- a/pkg/index/operator/config/config_test.go +++ b/pkg/index/operator/config/config_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/pkg/index/operator/service/operator.go b/pkg/index/operator/service/operator.go index cfc086a58f9..34cf391b657 100644 --- a/pkg/index/operator/service/operator.go +++ b/pkg/index/operator/service/operator.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/index/operator/service/options.go b/pkg/index/operator/service/options.go index 513d9b6791f..692aa0015e4 100644 --- a/pkg/index/operator/service/options.go +++ b/pkg/index/operator/service/options.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/index/operator/service/options_test.go b/pkg/index/operator/service/options_test.go index 193ccdaf681..d00f276ec51 100644 --- a/pkg/index/operator/service/options_test.go +++ b/pkg/index/operator/service/options_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/index/operator/usecase/operator.go b/pkg/index/operator/usecase/operator.go index 86906e2c6de..aeec88187e9 100644 --- a/pkg/index/operator/usecase/operator.go +++ b/pkg/index/operator/usecase/operator.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase import ( diff --git a/pkg/index/operator/usecase/operator_test.go b/pkg/index/operator/usecase/operator_test.go index f4b4f1b6540..c7b877ea7f6 100644 --- a/pkg/index/operator/usecase/operator_test.go +++ b/pkg/index/operator/usecase/operator_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase // NOT IMPLEMENTED BELOW diff --git a/pkg/manager/index/handler/rest/handler_test.go b/pkg/manager/index/handler/rest/handler_test.go index 1cad5e5dbab..c81dacfa7ac 100644 --- a/pkg/manager/index/handler/rest/handler_test.go +++ b/pkg/manager/index/handler/rest/handler_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/manager/index/handler/rest/option_test.go b/pkg/manager/index/handler/rest/option_test.go index 594e3367272..67e519fe7a7 100644 --- a/pkg/manager/index/handler/rest/option_test.go +++ b/pkg/manager/index/handler/rest/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/manager/index/router/option_test.go b/pkg/manager/index/router/option_test.go index c39d90a7bc4..3c767e34be9 100644 --- a/pkg/manager/index/router/option_test.go +++ b/pkg/manager/index/router/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/manager/index/router/router_test.go b/pkg/manager/index/router/router_test.go index e9e3069588a..2fc44430413 100644 --- a/pkg/manager/index/router/router_test.go +++ b/pkg/manager/index/router/router_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/manager/index/service/indexer.go b/pkg/manager/index/service/indexer.go index 4fa18039817..6bba5d10fac 100644 --- a/pkg/manager/index/service/indexer.go +++ b/pkg/manager/index/service/indexer.go @@ -56,7 +56,7 @@ type index struct { indexDurationLimit time.Duration saveIndexDuration time.Duration saveIndexDurationLimit time.Duration - shouldSaveList sync.Map[string, struct{}] + shouldSaveList sync.Map[string, bool] createIndexConcurrency int saveIndexConcurrency int indexInfos sync.Map[string, *payload.Info_Index_Count] @@ -67,8 +67,6 @@ type index struct { uncommittedUUIDsCount uint32 } -var empty = struct{}{} - func New(opts ...Option) (idx Indexer, err error) { i := new(index) for _, opt := range append(defaultOptions, opts...) { @@ -243,7 +241,7 @@ func (idx *index) createIndex(ctx context.Context, enableLowIndexSkip bool) (err log.Warnf("an error occurred while calling CreateIndex of %s: %s", addr, err) return err } - _, ok = idx.shouldSaveList.LoadOrStore(addr, empty) + _, ok = idx.shouldSaveList.LoadOrStore(addr, true) if ok { log.Debugf("addr %s already queued for saveIndex", addr) return nil diff --git a/pkg/manager/index/service/indexer_test.go b/pkg/manager/index/service/indexer_test.go index a4e80576c7d..8b0d017b70f 100644 --- a/pkg/manager/index/service/indexer_test.go +++ b/pkg/manager/index/service/indexer_test.go @@ -120,7 +120,7 @@ package service // indexDurationLimit time.Duration // saveIndexDuration time.Duration // saveIndexDurationLimit time.Duration -// shouldSaveList sync.Map[string, struct{}] +// shouldSaveList sync.Map[string, bool] // createIndexConcurrency int // saveIndexConcurrency int // indexInfos sync.Map[string, *payload.Info_Index_Count] @@ -283,7 +283,7 @@ package service // indexDurationLimit time.Duration // saveIndexDuration time.Duration // saveIndexDurationLimit time.Duration -// shouldSaveList sync.Map[string, struct{}] +// shouldSaveList sync.Map[string, bool] // createIndexConcurrency int // saveIndexConcurrency int // indexInfos sync.Map[string, *payload.Info_Index_Count] @@ -444,7 +444,7 @@ package service // indexDurationLimit time.Duration // saveIndexDuration time.Duration // saveIndexDurationLimit time.Duration -// shouldSaveList sync.Map[string, struct{}] +// shouldSaveList sync.Map[string, bool] // createIndexConcurrency int // saveIndexConcurrency int // indexInfos sync.Map[string, *payload.Info_Index_Count] @@ -604,7 +604,7 @@ package service // indexDurationLimit time.Duration // saveIndexDuration time.Duration // saveIndexDurationLimit time.Duration -// shouldSaveList sync.Map[string, struct{}] +// shouldSaveList sync.Map[string, bool] // createIndexConcurrency int // saveIndexConcurrency int // indexInfos sync.Map[string, *payload.Info_Index_Count] @@ -759,7 +759,7 @@ package service // indexDurationLimit time.Duration // saveIndexDuration time.Duration // saveIndexDurationLimit time.Duration -// shouldSaveList sync.Map[string, struct{}] +// shouldSaveList sync.Map[string, bool] // createIndexConcurrency int // saveIndexConcurrency int // indexInfos sync.Map[string, *payload.Info_Index_Count] @@ -907,7 +907,7 @@ package service // indexDurationLimit time.Duration // saveIndexDuration time.Duration // saveIndexDurationLimit time.Duration -// shouldSaveList sync.Map[string, struct{}] +// shouldSaveList sync.Map[string, bool] // createIndexConcurrency int // saveIndexConcurrency int // indexInfos sync.Map[string, *payload.Info_Index_Count] @@ -1055,7 +1055,7 @@ package service // indexDurationLimit time.Duration // saveIndexDuration time.Duration // saveIndexDurationLimit time.Duration -// shouldSaveList sync.Map[string, struct{}] +// shouldSaveList sync.Map[string, bool] // createIndexConcurrency int // saveIndexConcurrency int // indexInfos sync.Map[string, *payload.Info_Index_Count] @@ -1203,7 +1203,7 @@ package service // indexDurationLimit time.Duration // saveIndexDuration time.Duration // saveIndexDurationLimit time.Duration -// shouldSaveList sync.Map[string, struct{}] +// shouldSaveList sync.Map[string, bool] // createIndexConcurrency int // saveIndexConcurrency int // indexInfos sync.Map[string, *payload.Info_Index_Count] @@ -1351,7 +1351,7 @@ package service // indexDurationLimit time.Duration // saveIndexDuration time.Duration // saveIndexDurationLimit time.Duration -// shouldSaveList sync.Map[string, struct{}] +// shouldSaveList sync.Map[string, bool] // createIndexConcurrency int // saveIndexConcurrency int // indexInfos sync.Map[string, *payload.Info_Index_Count] diff --git a/pkg/tools/benchmark/job/handler/grpc/handler_test.go b/pkg/tools/benchmark/job/handler/grpc/handler_test.go index 3b50d59c42b..bedc3ff4ad8 100644 --- a/pkg/tools/benchmark/job/handler/grpc/handler_test.go +++ b/pkg/tools/benchmark/job/handler/grpc/handler_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/job/handler/rest/handler_test.go b/pkg/tools/benchmark/job/handler/rest/handler_test.go index 5fae0a75a74..e01c8be394e 100644 --- a/pkg/tools/benchmark/job/handler/rest/handler_test.go +++ b/pkg/tools/benchmark/job/handler/rest/handler_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/job/router/option_test.go b/pkg/tools/benchmark/job/router/option_test.go index 42e073651c2..91bbc265e96 100644 --- a/pkg/tools/benchmark/job/router/option_test.go +++ b/pkg/tools/benchmark/job/router/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/job/router/router_test.go b/pkg/tools/benchmark/job/router/router_test.go index e9e3069588a..2fc44430413 100644 --- a/pkg/tools/benchmark/job/router/router_test.go +++ b/pkg/tools/benchmark/job/router/router_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/job/service/insert_test.go b/pkg/tools/benchmark/job/service/insert_test.go index c007886fd2c..a4b2164d045 100644 --- a/pkg/tools/benchmark/job/service/insert_test.go +++ b/pkg/tools/benchmark/job/service/insert_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/job/service/job_test.go b/pkg/tools/benchmark/job/service/job_test.go index d5a9170c9c6..9dc8ffa02af 100644 --- a/pkg/tools/benchmark/job/service/job_test.go +++ b/pkg/tools/benchmark/job/service/job_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/job/service/object_test.go b/pkg/tools/benchmark/job/service/object_test.go index 9fbdb3aab4f..6140dc64ba2 100644 --- a/pkg/tools/benchmark/job/service/object_test.go +++ b/pkg/tools/benchmark/job/service/object_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/job/service/option_test.go b/pkg/tools/benchmark/job/service/option_test.go index 53d87247df5..0ec6d3865b0 100644 --- a/pkg/tools/benchmark/job/service/option_test.go +++ b/pkg/tools/benchmark/job/service/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/job/service/remove_test.go b/pkg/tools/benchmark/job/service/remove_test.go index c3d34123899..e1f1775f4f1 100644 --- a/pkg/tools/benchmark/job/service/remove_test.go +++ b/pkg/tools/benchmark/job/service/remove_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/job/service/search_test.go b/pkg/tools/benchmark/job/service/search_test.go index 2de062dabf3..a5294fe93e0 100644 --- a/pkg/tools/benchmark/job/service/search_test.go +++ b/pkg/tools/benchmark/job/service/search_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/job/service/update_test.go b/pkg/tools/benchmark/job/service/update_test.go index f7b86ed04ad..f44c57405bd 100644 --- a/pkg/tools/benchmark/job/service/update_test.go +++ b/pkg/tools/benchmark/job/service/update_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/job/service/upsert_test.go b/pkg/tools/benchmark/job/service/upsert_test.go index 4c798f9e135..05bdca258c9 100644 --- a/pkg/tools/benchmark/job/service/upsert_test.go +++ b/pkg/tools/benchmark/job/service/upsert_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/job/usecase/benchmarkd_test.go b/pkg/tools/benchmark/job/usecase/benchmarkd_test.go index aaec5fc90ad..d7d7a5b12db 100644 --- a/pkg/tools/benchmark/job/usecase/benchmarkd_test.go +++ b/pkg/tools/benchmark/job/usecase/benchmarkd_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/operator/config/config_test.go b/pkg/tools/benchmark/operator/config/config_test.go index 6424dcee876..a21b3364cf9 100644 --- a/pkg/tools/benchmark/operator/config/config_test.go +++ b/pkg/tools/benchmark/operator/config/config_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package config // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/operator/handler/grpc/handler_test.go b/pkg/tools/benchmark/operator/handler/grpc/handler_test.go index 642123ce1de..f7fabb7ff69 100644 --- a/pkg/tools/benchmark/operator/handler/grpc/handler_test.go +++ b/pkg/tools/benchmark/operator/handler/grpc/handler_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package grpc // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/operator/handler/rest/handler_test.go b/pkg/tools/benchmark/operator/handler/rest/handler_test.go index 5fae0a75a74..e01c8be394e 100644 --- a/pkg/tools/benchmark/operator/handler/rest/handler_test.go +++ b/pkg/tools/benchmark/operator/handler/rest/handler_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package rest // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/operator/router/option_test.go b/pkg/tools/benchmark/operator/router/option_test.go index 42e073651c2..91bbc265e96 100644 --- a/pkg/tools/benchmark/operator/router/option_test.go +++ b/pkg/tools/benchmark/operator/router/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/operator/router/router_test.go b/pkg/tools/benchmark/operator/router/router_test.go index e9e3069588a..2fc44430413 100644 --- a/pkg/tools/benchmark/operator/router/router_test.go +++ b/pkg/tools/benchmark/operator/router/router_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package router // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/operator/service/operator_test.go b/pkg/tools/benchmark/operator/service/operator_test.go index 70129badaa9..610cd0dbd87 100644 --- a/pkg/tools/benchmark/operator/service/operator_test.go +++ b/pkg/tools/benchmark/operator/service/operator_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/tools/benchmark/operator/service/option_test.go b/pkg/tools/benchmark/operator/service/option_test.go index 04be36cdf2b..a980f0cd1cb 100644 --- a/pkg/tools/benchmark/operator/service/option_test.go +++ b/pkg/tools/benchmark/operator/service/option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/benchmark/operator/usecase/benchmarkd_test.go b/pkg/tools/benchmark/operator/usecase/benchmarkd_test.go index c8be6191f42..12271247aae 100644 --- a/pkg/tools/benchmark/operator/usecase/benchmarkd_test.go +++ b/pkg/tools/benchmark/operator/usecase/benchmarkd_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package usecase // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/cli/loadtest/assets/dataset.go b/pkg/tools/cli/loadtest/assets/dataset.go index acd03fd9249..b2f14fa8fa0 100644 --- a/pkg/tools/cli/loadtest/assets/dataset.go +++ b/pkg/tools/cli/loadtest/assets/dataset.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package assets import ( diff --git a/pkg/tools/cli/loadtest/assets/dataset_test.go b/pkg/tools/cli/loadtest/assets/dataset_test.go index 8132ccf12fb..5e6a003ea37 100644 --- a/pkg/tools/cli/loadtest/assets/dataset_test.go +++ b/pkg/tools/cli/loadtest/assets/dataset_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package assets // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/cli/loadtest/assets/hdf5_loader.go b/pkg/tools/cli/loadtest/assets/hdf5_loader.go index c06dea16ccf..faea542a0ad 100644 --- a/pkg/tools/cli/loadtest/assets/hdf5_loader.go +++ b/pkg/tools/cli/loadtest/assets/hdf5_loader.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package assets import ( diff --git a/pkg/tools/cli/loadtest/assets/hdf5_loader_test.go b/pkg/tools/cli/loadtest/assets/hdf5_loader_test.go index be5e1b607b3..92ae92939e0 100644 --- a/pkg/tools/cli/loadtest/assets/hdf5_loader_test.go +++ b/pkg/tools/cli/loadtest/assets/hdf5_loader_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package assets // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/cli/loadtest/assets/large_dataset.go b/pkg/tools/cli/loadtest/assets/large_dataset.go index 1649fea69f8..08107e9ee00 100644 --- a/pkg/tools/cli/loadtest/assets/large_dataset.go +++ b/pkg/tools/cli/loadtest/assets/large_dataset.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package assets import ( diff --git a/pkg/tools/cli/loadtest/assets/large_dataset_test.go b/pkg/tools/cli/loadtest/assets/large_dataset_test.go index 58183c6df5f..ae57627057f 100644 --- a/pkg/tools/cli/loadtest/assets/large_dataset_test.go +++ b/pkg/tools/cli/loadtest/assets/large_dataset_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package assets // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/cli/loadtest/assets/small_dataset.go b/pkg/tools/cli/loadtest/assets/small_dataset.go index 52e141cc1e4..8c468399ea3 100644 --- a/pkg/tools/cli/loadtest/assets/small_dataset.go +++ b/pkg/tools/cli/loadtest/assets/small_dataset.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package assets import ( diff --git a/pkg/tools/cli/loadtest/assets/small_dataset_test.go b/pkg/tools/cli/loadtest/assets/small_dataset_test.go index d6aa962cf9d..f284595cfe4 100644 --- a/pkg/tools/cli/loadtest/assets/small_dataset_test.go +++ b/pkg/tools/cli/loadtest/assets/small_dataset_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package assets // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/cli/loadtest/service/insert.go b/pkg/tools/cli/loadtest/service/insert.go index 54562961c53..ef609b9cf67 100644 --- a/pkg/tools/cli/loadtest/service/insert.go +++ b/pkg/tools/cli/loadtest/service/insert.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/tools/cli/loadtest/service/insert_test.go b/pkg/tools/cli/loadtest/service/insert_test.go index 424a1ed61ba..d36c7fddd04 100644 --- a/pkg/tools/cli/loadtest/service/insert_test.go +++ b/pkg/tools/cli/loadtest/service/insert_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/cli/loadtest/service/loader.go b/pkg/tools/cli/loadtest/service/loader.go index c22c500f477..5cb9293ebcd 100644 --- a/pkg/tools/cli/loadtest/service/loader.go +++ b/pkg/tools/cli/loadtest/service/loader.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/tools/cli/loadtest/service/loader_option.go b/pkg/tools/cli/loadtest/service/loader_option.go index 9b365834fae..19d3438dace 100644 --- a/pkg/tools/cli/loadtest/service/loader_option.go +++ b/pkg/tools/cli/loadtest/service/loader_option.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/tools/cli/loadtest/service/loader_option_test.go b/pkg/tools/cli/loadtest/service/loader_option_test.go index 91dbb959765..055c0b980c2 100644 --- a/pkg/tools/cli/loadtest/service/loader_option_test.go +++ b/pkg/tools/cli/loadtest/service/loader_option_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/cli/loadtest/service/loader_test.go b/pkg/tools/cli/loadtest/service/loader_test.go index e5f46563ce6..2c2e162563d 100644 --- a/pkg/tools/cli/loadtest/service/loader_test.go +++ b/pkg/tools/cli/loadtest/service/loader_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/pkg/tools/cli/loadtest/service/search.go b/pkg/tools/cli/loadtest/service/search.go index 722a924d7c1..e76f3a6c16c 100644 --- a/pkg/tools/cli/loadtest/service/search.go +++ b/pkg/tools/cli/loadtest/service/search.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service import ( diff --git a/pkg/tools/cli/loadtest/service/search_test.go b/pkg/tools/cli/loadtest/service/search_test.go index cb7c1b4e8f7..5e496005ef0 100644 --- a/pkg/tools/cli/loadtest/service/search_test.go +++ b/pkg/tools/cli/loadtest/service/search_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package service // NOT IMPLEMENTED BELOW diff --git a/tests/e2e/crud/crud_test.go b/tests/e2e/crud/crud_test.go index 09bc5cab46e..76e260ebc68 100644 --- a/tests/e2e/crud/crud_test.go +++ b/tests/e2e/crud/crud_test.go @@ -25,6 +25,7 @@ import ( "fmt" "os" "os/exec" + "strings" "testing" "time" @@ -802,8 +803,29 @@ func TestE2EIndexJobCorrection(t *testing.T) { } t.Log("Test case 2: execute index correction after one agent removed") - t.Log("removing vald-agent-0...") - cmd := exec.CommandContext(ctx, "sh", "-c", "kubectl delete pod vald-agent-0 && kubectl wait --for=condition=Ready pod/vald-agent-0") + detail, err := op.IndexDetail(t, ctx) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } + if len(detail.Counts) == 0 { + t.Fatal("no pods found with index details") + } + var target string + for a, c := range detail.Counts { + if c.Stored > 0 { + parts := strings.Split(a, ":") + if len(parts) == 0 { + t.Fatalf("invalid address format: %s", a) + } + target = parts[0] + break + } + } + if target == "" { + t.Fatal("no pods found with stored count > 0") + } + + cmd := exec.CommandContext(ctx, "sh", "-c", fmt.Sprintf("kubectl get pods -o custom-columns=:metadata.name --no-headers=true --field-selector=\"status.podIP=%s\"", target)) out, err := cmd.Output() if err != nil { if exitErr, ok := err.(*exec.ExitError); ok { @@ -812,6 +834,18 @@ func TestE2EIndexJobCorrection(t *testing.T) { t.Fatalf("unexpected error on creating job: %v", err) } } + agent := strings.TrimRight(string(out), "\n") + + t.Logf("removing %s...", agent) + cmd = exec.CommandContext(ctx, "sh", "-c", fmt.Sprintf("kubectl delete pod %s && kubectl wait --for=condition=Ready pod/%s", agent, agent)) + out, err = cmd.Output() + if err != nil { + if exitErr, ok := err.(*exec.ExitError); ok { + t.Fatalf("%s, %s, %v", string(out), string(exitErr.Stderr), err) + } else { + t.Fatalf("unexpected error on creating job: %v", err) + } + } t.Log(string(out)) // correct the deleted index diff --git a/tests/e2e/operation/job.go b/tests/e2e/operation/job.go index 2a9e2efbecb..5230da62981 100644 --- a/tests/e2e/operation/job.go +++ b/tests/e2e/operation/job.go @@ -1,18 +1,20 @@ //go:build e2e +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation import ( diff --git a/tests/e2e/operation/multi.go b/tests/e2e/operation/multi.go index 890f24c7431..a91c7f94853 100644 --- a/tests/e2e/operation/multi.go +++ b/tests/e2e/operation/multi.go @@ -1,18 +1,20 @@ //go:build e2e +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation import ( diff --git a/tests/e2e/operation/operation.go b/tests/e2e/operation/operation.go index 9ee24d79e91..4e7be61b5f1 100644 --- a/tests/e2e/operation/operation.go +++ b/tests/e2e/operation/operation.go @@ -1,18 +1,20 @@ //go:build e2e +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation import ( @@ -133,6 +135,7 @@ type Client interface { CreateIndex(t *testing.T, ctx context.Context) error SaveIndex(t *testing.T, ctx context.Context) error IndexInfo(t *testing.T, ctx context.Context) (*payload.Info_Index_Count, error) + IndexDetail(t *testing.T, ctx context.Context) (*payload.Info_Index_Detail, error) } type client struct { @@ -182,6 +185,17 @@ func (c *client) IndexInfo(t *testing.T, ctx context.Context) (*payload.Info_Ind return client.IndexInfo(ctx, &payload.Empty{}) } +func (c *client) IndexDetail( + t *testing.T, ctx context.Context, +) (*payload.Info_Index_Detail, error) { + client, err := c.getClient() + if err != nil { + return nil, err + } + + return client.IndexDetail(ctx, &payload.Empty{}) +} + func (c *client) getGRPCConn() (*grpc.ClientConn, error) { return grpc.NewClient( c.host+":"+strconv.Itoa(c.port), diff --git a/tests/e2e/operation/stream.go b/tests/e2e/operation/stream.go index ccf67484668..afde22ad021 100644 --- a/tests/e2e/operation/stream.go +++ b/tests/e2e/operation/stream.go @@ -1,18 +1,20 @@ //go:build e2e +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package operation import ( diff --git a/tests/performance/max_vector_dim_test.go b/tests/performance/max_vector_dim_test.go index d39db3e5f46..c58c74fa63d 100644 --- a/tests/performance/max_vector_dim_test.go +++ b/tests/performance/max_vector_dim_test.go @@ -1,16 +1,18 @@ +// // Copyright (C) 2019-2024 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // You may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// package performance import (