From cca7bc92c19c1865f388771dc377b61bb066fcd0 Mon Sep 17 00:00:00 2001 From: hlts2 Date: Thu, 18 May 2023 12:47:12 +0900 Subject: [PATCH 1/2] fix field name and yaml indent Signed-off-by: hlts2 --- apis/proto/v1/payload/payload.proto | 4 ++-- cmd/gateway/mirror/sample.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apis/proto/v1/payload/payload.proto b/apis/proto/v1/payload/payload.proto index 92f168d425..829309203a 100644 --- a/apis/proto/v1/payload/payload.proto +++ b/apis/proto/v1/payload/payload.proto @@ -529,8 +529,8 @@ message Mirror { // Represent server information. message Target { - // The target ip. - string ip = 1; + // The target hostname. + string host = 1; // The target port. uint32 port = 2; } diff --git a/cmd/gateway/mirror/sample.yaml b/cmd/gateway/mirror/sample.yaml index ffcd6c861d..38e6707734 100644 --- a/cmd/gateway/mirror/sample.yaml +++ b/cmd/gateway/mirror/sample.yaml @@ -143,6 +143,6 @@ gateway: write_buffer_size: 0 tls: enabled: false - ca: /path/to/ca + ca: /path/to/ca cert: /path/to/cert key: /path/to/key From 2494c67d35aa7a2e3aeda6627a7fbeeaa4d1c6eb Mon Sep 17 00:00:00 2001 From: hlts2 Date: Thu, 18 May 2023 13:26:22 +0900 Subject: [PATCH 2/2] make proto/add format Signed-off-by: hlts2 --- .../dockers-gateway-mirror-image.yaml | 2 +- apis/docs/v1/docs.md | 10 ++--- apis/grpc/v1/mirror/mirror.pb.go | 14 +++---- apis/grpc/v1/payload/payload.pb.go | 40 +++++++++---------- apis/grpc/v1/payload/payload_vtproto.pb.go | 14 +++---- .../apis/proto/v1/mirror/mirror.swagger.json | 6 +-- .../vald/values/multi-vald/dev-vald-01.yaml | 15 +++++++ .../vald/values/multi-vald/dev-vald-02.yaml | 15 +++++++ .../vald/values/multi-vald/dev-vald-03.yaml | 15 +++++++ .../multi-vald/dev-vald-with-mirror.yaml | 15 +++++++ cmd/gateway/mirror/main.go | 8 +--- cmd/gateway/mirror/sample.yaml | 2 +- dockers/gateway/mirror/Dockerfile | 3 +- internal/client/v1/client/mirror/mirror.go | 13 ++++++ internal/client/v1/client/mirror/option.go | 13 ++++++ internal/config/mirror.go | 16 +++----- pkg/gateway/mirror/config/config.go | 8 +--- pkg/gateway/mirror/handler/doc.go | 7 +--- pkg/gateway/mirror/handler/grpc/handler.go | 13 +++--- .../mirror/handler/grpc/handler_test.go | 13 ++++++ pkg/gateway/mirror/handler/grpc/mock_test.go | 13 ++++++ pkg/gateway/mirror/handler/grpc/option.go | 8 +--- pkg/gateway/mirror/handler/rest/handler.go | 8 +--- pkg/gateway/mirror/handler/rest/option.go | 8 +--- pkg/gateway/mirror/router/option.go | 8 +--- pkg/gateway/mirror/router/router.go | 8 +--- pkg/gateway/mirror/service/doc.go | 8 +--- pkg/gateway/mirror/service/gateway.go | 8 +--- pkg/gateway/mirror/service/mirror.go | 8 +--- pkg/gateway/mirror/service/mirror_option.go | 13 ++++++ pkg/gateway/mirror/service/option.go | 8 +--- pkg/gateway/mirror/usecase/vald.go | 8 +--- 32 files changed, 208 insertions(+), 140 deletions(-) diff --git a/.github/workflows/dockers-gateway-mirror-image.yaml b/.github/workflows/dockers-gateway-mirror-image.yaml index 5c3fe5592e..b95c98b86b 100644 --- a/.github/workflows/dockers-gateway-mirror-image.yaml +++ b/.github/workflows/dockers-gateway-mirror-image.yaml @@ -1,5 +1,5 @@ # -# Copyright (C) 2019-2022 vdaas.org vald team +# Copyright (C) 2019-2023 vdaas.org vald team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/apis/docs/v1/docs.md b/apis/docs/v1/docs.md index ee60afe53a..fc970b2fa2 100644 --- a/apis/docs/v1/docs.md +++ b/apis/docs/v1/docs.md @@ -490,10 +490,10 @@ Mirror related messages. Represent server information. -| Field | Type | Label | Description | -| ----- | ----------------- | ----- | ---------------- | -| ip | [string](#string) | | The target ip. | -| port | [uint32](#uint32) | | The target port. | +| Field | Type | Label | Description | +| ----- | ----------------- | ----- | -------------------- | +| host | [string](#string) | | The target hostname. | +| port | [uint32](#uint32) | | The target port. | @@ -1093,7 +1093,7 @@ Upsert service provides ways to insert/update vectors. ## apis/proto/v1/mirror/mirror.proto -Copyright (C) 2019-2022 vdaas.org vald team <vald@vdaas.org> +Copyright (C) 2019-2023 vdaas.org vald team <vald@vdaas.org> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/apis/grpc/v1/mirror/mirror.pb.go b/apis/grpc/v1/mirror/mirror.pb.go index c5938c0f7f..001926e83c 100644 --- a/apis/grpc/v1/mirror/mirror.pb.go +++ b/apis/grpc/v1/mirror/mirror.pb.go @@ -16,8 +16,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.12 +// protoc-gen-go v1.30.0 +// protoc v4.22.3 // source: apis/proto/v1/mirror/mirror.proto package mirror @@ -55,15 +55,15 @@ var file_apis_proto_v1_mirror_mirror_proto_rawDesc = []byte{ 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x73, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x6d, 0x69, 0x72, 0x72, - 0x6f, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x3a, 0x01, 0x2a, 0x12, 0x61, + 0x73, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x3a, 0x01, 0x2a, 0x22, 0x10, 0x2f, 0x6d, + 0x69, 0x72, 0x72, 0x6f, 0x72, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x61, 0x0a, 0x09, 0x41, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x12, 0x1a, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x1a, 0x1a, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x73, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x22, 0x11, 0x2f, 0x6d, 0x69, - 0x72, 0x72, 0x6f, 0x72, 0x2f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x3a, 0x01, - 0x2a, 0x42, 0x57, 0x0a, 0x1c, 0x6f, 0x72, 0x67, 0x2e, 0x76, 0x64, 0x61, 0x61, 0x73, 0x2e, 0x76, + 0x65, 0x74, 0x73, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, + 0x2f, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x2f, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, + 0x65, 0x42, 0x57, 0x0a, 0x1c, 0x6f, 0x72, 0x67, 0x2e, 0x76, 0x64, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x61, 0x6c, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x0a, 0x56, 0x61, 0x6c, 0x64, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x64, 0x61, 0x61, diff --git a/apis/grpc/v1/payload/payload.pb.go b/apis/grpc/v1/payload/payload.pb.go index 2bf3f6819b..52ff323675 100644 --- a/apis/grpc/v1/payload/payload.pb.go +++ b/apis/grpc/v1/payload/payload.pb.go @@ -4034,8 +4034,8 @@ type Mirror_Target struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The target ip. - Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` + // The target hostname. + Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` // The target port. Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` } @@ -4072,9 +4072,9 @@ func (*Mirror_Target) Descriptor() ([]byte, []int) { return file_apis_proto_v1_payload_payload_proto_rawDescGZIP(), []int{10, 0} } -func (x *Mirror_Target) GetIp() string { +func (x *Mirror_Target) GetHost() string { if x != nil { - return x.Ip + return x.Host } return "" } @@ -4515,22 +4515,22 @@ var file_apis_proto_v1_payload_payload_proto_rawDesc = []byte{ 0x15, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x1a, 0x15, 0x0a, 0x03, 0x49, 0x50, 0x73, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0x76, - 0x0a, 0x06, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x2c, 0x0a, 0x06, 0x54, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x3e, 0x0a, 0x07, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x73, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x07, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, - 0x5a, 0x0a, 0x1d, 0x6f, 0x72, 0x67, 0x2e, 0x76, 0x64, 0x61, 0x61, 0x73, 0x2e, 0x76, 0x61, 0x6c, - 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x42, 0x0b, 0x56, 0x61, 0x6c, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x01, 0x5a, - 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x64, 0x61, 0x61, - 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x67, 0x72, 0x70, 0x63, - 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x22, 0x7a, + 0x0a, 0x06, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x30, 0x0a, 0x06, 0x54, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x1a, 0x3e, 0x0a, 0x07, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x42, 0x5a, 0x0a, 0x1d, 0x6f, 0x72, 0x67, 0x2e, 0x76, 0x64, 0x61, 0x61, 0x73, + 0x2e, 0x76, 0x61, 0x6c, 0x64, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x0b, 0x56, 0x61, 0x6c, 0x64, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x76, 0x64, 0x61, 0x61, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, + 0x67, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/apis/grpc/v1/payload/payload_vtproto.pb.go b/apis/grpc/v1/payload/payload_vtproto.pb.go index c4d386345e..6b8afe64c2 100644 --- a/apis/grpc/v1/payload/payload_vtproto.pb.go +++ b/apis/grpc/v1/payload/payload_vtproto.pb.go @@ -3585,10 +3585,10 @@ func (m *Mirror_Target) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i-- dAtA[i] = 0x10 } - if len(m.Ip) > 0 { - i -= len(m.Ip) - copy(dAtA[i:], m.Ip) - i = encodeVarint(dAtA, i, uint64(len(m.Ip))) + if len(m.Host) > 0 { + i -= len(m.Host) + copy(dAtA[i:], m.Host) + i = encodeVarint(dAtA, i, uint64(len(m.Host))) i-- dAtA[i] = 0xa } @@ -5021,7 +5021,7 @@ func (m *Mirror_Target) SizeVT() (n int) { } var l int _ = l - l = len(m.Ip) + l = len(m.Host) if l > 0 { n += 1 + l + sov(uint64(l)) } @@ -12419,7 +12419,7 @@ func (m *Mirror_Target) UnmarshalVT(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ip", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -12447,7 +12447,7 @@ func (m *Mirror_Target) UnmarshalVT(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Ip = string(dAtA[iNdEx:postIndex]) + m.Host = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 0 { diff --git a/apis/swagger/v1/mirror/apis/proto/v1/mirror/mirror.swagger.json b/apis/swagger/v1/mirror/apis/proto/v1/mirror/mirror.swagger.json index ba39fe8420..55c719d71e 100644 --- a/apis/swagger/v1/mirror/apis/proto/v1/mirror/mirror.swagger.json +++ b/apis/swagger/v1/mirror/apis/proto/v1/mirror/mirror.swagger.json @@ -97,7 +97,7 @@ "description": "Must be a valid serialized protocol buffer of the above specified type." } }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\nExample 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\nExample 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "runtimeError": { "type": "object", @@ -123,9 +123,9 @@ "v1MirrorTarget": { "type": "object", "properties": { - "ip": { + "host": { "type": "string", - "description": "The target ip." + "description": "The target hostname." }, "port": { "type": "integer", diff --git a/charts/vald/values/multi-vald/dev-vald-01.yaml b/charts/vald/values/multi-vald/dev-vald-01.yaml index 0849bb2433..467d488e03 100644 --- a/charts/vald/values/multi-vald/dev-vald-01.yaml +++ b/charts/vald/values/multi-vald/dev-vald-01.yaml @@ -1,3 +1,18 @@ +# +# Copyright (C) 2019-2023 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this 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. +# discoverer: clusterRoleBinding: name: vald-01 diff --git a/charts/vald/values/multi-vald/dev-vald-02.yaml b/charts/vald/values/multi-vald/dev-vald-02.yaml index 7e60a18b34..7b4f21c1b7 100644 --- a/charts/vald/values/multi-vald/dev-vald-02.yaml +++ b/charts/vald/values/multi-vald/dev-vald-02.yaml @@ -1,3 +1,18 @@ +# +# Copyright (C) 2019-2023 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this 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. +# discoverer: clusterRole: enabled: false diff --git a/charts/vald/values/multi-vald/dev-vald-03.yaml b/charts/vald/values/multi-vald/dev-vald-03.yaml index 27a37502bb..1783b246a6 100644 --- a/charts/vald/values/multi-vald/dev-vald-03.yaml +++ b/charts/vald/values/multi-vald/dev-vald-03.yaml @@ -1,3 +1,18 @@ +# +# Copyright (C) 2019-2023 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this 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. +# gateway: mirror: gateway_config: diff --git a/charts/vald/values/multi-vald/dev-vald-with-mirror.yaml b/charts/vald/values/multi-vald/dev-vald-with-mirror.yaml index 7c243cffde..257aa42486 100644 --- a/charts/vald/values/multi-vald/dev-vald-with-mirror.yaml +++ b/charts/vald/values/multi-vald/dev-vald-with-mirror.yaml @@ -1,3 +1,18 @@ +# +# Copyright (C) 2019-2023 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this 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. +# defaults: image: tag: pr-1949 # TODO: Delete it later. diff --git a/cmd/gateway/mirror/main.go b/cmd/gateway/mirror/main.go index 9f595fdc81..8eb77f8ebd 100644 --- a/cmd/gateway/mirror/main.go +++ b/cmd/gateway/mirror/main.go @@ -1,20 +1,16 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team +// Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES 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 provides program main package main import ( diff --git a/cmd/gateway/mirror/sample.yaml b/cmd/gateway/mirror/sample.yaml index 38e6707734..d9d32c8a59 100644 --- a/cmd/gateway/mirror/sample.yaml +++ b/cmd/gateway/mirror/sample.yaml @@ -1,5 +1,5 @@ # -# Copyright (C) 2019-2022 vdaas.org vald team +# Copyright (C) 2019-2023 vdaas.org vald team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/dockers/gateway/mirror/Dockerfile b/dockers/gateway/mirror/Dockerfile index e21ac01dbf..4407751816 100644 --- a/dockers/gateway/mirror/Dockerfile +++ b/dockers/gateway/mirror/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright (C) 2019-2022 vdaas.org vald team +# Copyright (C) 2019-2023 vdaas.org vald team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,7 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # - ARG GO_VERSION=latest ARG DISTROLESS_IMAGE=gcr.io/distroless/static ARG DISTROLESS_IMAGE_TAG=nonroot diff --git a/internal/client/v1/client/mirror/mirror.go b/internal/client/v1/client/mirror/mirror.go index 30c6b25425..4c100024fb 100644 --- a/internal/client/v1/client/mirror/mirror.go +++ b/internal/client/v1/client/mirror/mirror.go @@ -1,3 +1,16 @@ +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this 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 mirror import ( diff --git a/internal/client/v1/client/mirror/option.go b/internal/client/v1/client/mirror/option.go index 894e76216b..fb8deb2ccf 100644 --- a/internal/client/v1/client/mirror/option.go +++ b/internal/client/v1/client/mirror/option.go @@ -1,3 +1,16 @@ +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this 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 mirror import ( diff --git a/internal/config/mirror.go b/internal/config/mirror.go index 43db1ab4ab..345acfa4bc 100644 --- a/internal/config/mirror.go +++ b/internal/config/mirror.go @@ -1,32 +1,28 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team +// Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES 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 providers configuration type and load configuration logic package config // Mirror represents the Mirror Gateway configuration. type Mirror struct { // Client represents the gRPC client configuration for connecting the LB Gateway. - Client *GRPCClient `json:"client" yaml:"client"` + Client *GRPCClient `json:"client" yaml:"client"` // SelfMirrorAddr represents the address for the self Mirror Gateway. - SelfMirrorAddr string `json:"self_mirror_addr" yaml:"self_mirror_addr"` + SelfMirrorAddr string `json:"self_mirror_addr" yaml:"self_mirror_addr"` // GatewayAddr represents the address for the Vald Gateway (e.g lb-gateway). - GatewayAddr string `json:"gateway_addr" yaml:"gateway_addr"` + GatewayAddr string `json:"gateway_addr" yaml:"gateway_addr"` // PodName represents self Mirror Gateway Pod name. - PodName string `json:"pod_name" yaml:"pod_name"` + PodName string `json:"pod_name" yaml:"pod_name"` // AdvertiseInterval represents interval to advertise Mirror Gateway information to other mirror gateway. AdvertiseInterval string `json:"advertise_interval" yaml:"advertise_interval"` } diff --git a/pkg/gateway/mirror/config/config.go b/pkg/gateway/mirror/config/config.go index fec0bf3618..d70f98ba2b 100644 --- a/pkg/gateway/mirror/config/config.go +++ b/pkg/gateway/mirror/config/config.go @@ -1,20 +1,16 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team +// Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// - -// Package setting stores all server application settings package config import ( diff --git a/pkg/gateway/mirror/handler/doc.go b/pkg/gateway/mirror/handler/doc.go index f1014141ea..fc21413970 100644 --- a/pkg/gateway/mirror/handler/doc.go +++ b/pkg/gateway/mirror/handler/doc.go @@ -1,17 +1,14 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team +// Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES 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 7b65ce351c..40ca2e49e1 100644 --- a/pkg/gateway/mirror/handler/grpc/handler.go +++ b/pkg/gateway/mirror/handler/grpc/handler.go @@ -1,20 +1,16 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team +// Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES 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 provides grpc server logic package grpc import ( @@ -794,7 +790,10 @@ func (s *server) StreamLinearSearch(stream vald.Search_StreamLinearSearchServer) } func (s *server) StreamLinearSearchByID(stream vald.Search_StreamLinearSearchByIDServer) (err error) { - ctx, span := trace.StartSpan(grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.SearchRPCServiceName+"/"+vald.StreamLinearSearchByIDRPCName), apiName+"/"+vald.StreamLinearSearchByIDRPCName) + ctx, span := trace.StartSpan( + grpc.WithGRPCMethod(stream.Context(), vald.PackageName+"."+vald.SearchRPCServiceName+"/"+vald.StreamLinearSearchByIDRPCName), + apiName+"/"+vald.StreamLinearSearchByIDRPCName, + ) defer func() { if span != nil { span.End() diff --git a/pkg/gateway/mirror/handler/grpc/handler_test.go b/pkg/gateway/mirror/handler/grpc/handler_test.go index 6127d02463..f49ea0da94 100644 --- a/pkg/gateway/mirror/handler/grpc/handler_test.go +++ b/pkg/gateway/mirror/handler/grpc/handler_test.go @@ -1,3 +1,16 @@ +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this 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 grpc import ( diff --git a/pkg/gateway/mirror/handler/grpc/mock_test.go b/pkg/gateway/mirror/handler/grpc/mock_test.go index f62078105a..74175c0f3a 100644 --- a/pkg/gateway/mirror/handler/grpc/mock_test.go +++ b/pkg/gateway/mirror/handler/grpc/mock_test.go @@ -1,3 +1,16 @@ +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this 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 grpc import ( diff --git a/pkg/gateway/mirror/handler/grpc/option.go b/pkg/gateway/mirror/handler/grpc/option.go index 09f0996e17..465aacffce 100644 --- a/pkg/gateway/mirror/handler/grpc/option.go +++ b/pkg/gateway/mirror/handler/grpc/option.go @@ -1,20 +1,16 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team +// Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES 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 provides grpc server logic package grpc import ( diff --git a/pkg/gateway/mirror/handler/rest/handler.go b/pkg/gateway/mirror/handler/rest/handler.go index 55a856e928..e5cb5fe064 100644 --- a/pkg/gateway/mirror/handler/rest/handler.go +++ b/pkg/gateway/mirror/handler/rest/handler.go @@ -1,20 +1,16 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team +// Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES 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 provides rest api logic package rest import ( diff --git a/pkg/gateway/mirror/handler/rest/option.go b/pkg/gateway/mirror/handler/rest/option.go index 109a418fe3..7ff96a2433 100644 --- a/pkg/gateway/mirror/handler/rest/option.go +++ b/pkg/gateway/mirror/handler/rest/option.go @@ -1,20 +1,16 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team +// Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES 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 provides rest api logic package rest import ( diff --git a/pkg/gateway/mirror/router/option.go b/pkg/gateway/mirror/router/option.go index d27a01fa5a..d9f6d4d1f0 100644 --- a/pkg/gateway/mirror/router/option.go +++ b/pkg/gateway/mirror/router/option.go @@ -1,20 +1,16 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team +// Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES 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 provides implementation of Go API for routing http Handler wrapped by rest.Func package router import ( diff --git a/pkg/gateway/mirror/router/router.go b/pkg/gateway/mirror/router/router.go index b2b0d06a24..73e330dcdb 100644 --- a/pkg/gateway/mirror/router/router.go +++ b/pkg/gateway/mirror/router/router.go @@ -1,20 +1,16 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team +// Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES 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 provides implementation of Go API for routing http Handler wrapped by rest.Func package router import ( diff --git a/pkg/gateway/mirror/service/doc.go b/pkg/gateway/mirror/service/doc.go index 266389f73d..41c6b0a25b 100644 --- a/pkg/gateway/mirror/service/doc.go +++ b/pkg/gateway/mirror/service/doc.go @@ -1,18 +1,14 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team +// Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES 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 manages the main logic of server. package service diff --git a/pkg/gateway/mirror/service/gateway.go b/pkg/gateway/mirror/service/gateway.go index 40690d4dc0..7725d0bb07 100644 --- a/pkg/gateway/mirror/service/gateway.go +++ b/pkg/gateway/mirror/service/gateway.go @@ -1,20 +1,16 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team +// Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES 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 package service import ( diff --git a/pkg/gateway/mirror/service/mirror.go b/pkg/gateway/mirror/service/mirror.go index 31d68340e8..ea63b9d198 100644 --- a/pkg/gateway/mirror/service/mirror.go +++ b/pkg/gateway/mirror/service/mirror.go @@ -1,20 +1,16 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team +// Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES 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 package service import ( diff --git a/pkg/gateway/mirror/service/mirror_option.go b/pkg/gateway/mirror/service/mirror_option.go index e942322c7f..e3c02d7be3 100644 --- a/pkg/gateway/mirror/service/mirror_option.go +++ b/pkg/gateway/mirror/service/mirror_option.go @@ -1,3 +1,16 @@ +// Copyright (C) 2019-2023 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this 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 service import ( diff --git a/pkg/gateway/mirror/service/option.go b/pkg/gateway/mirror/service/option.go index 6ee360463d..c16a5f95b5 100644 --- a/pkg/gateway/mirror/service/option.go +++ b/pkg/gateway/mirror/service/option.go @@ -1,20 +1,16 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team +// Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES 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 represents gateway's service logic package service import ( diff --git a/pkg/gateway/mirror/usecase/vald.go b/pkg/gateway/mirror/usecase/vald.go index bde3b59b3c..13a0a74c2d 100644 --- a/pkg/gateway/mirror/usecase/vald.go +++ b/pkg/gateway/mirror/usecase/vald.go @@ -1,20 +1,16 @@ -// -// Copyright (C) 2019-2022 vdaas.org vald team +// Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// https://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES 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 represents gateways usecase layer package usecase import (