Skip to content

Commit

Permalink
make format
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
  • Loading branch information
hlts2 committed Apr 13, 2023
1 parent 5db0546 commit f605563
Show file tree
Hide file tree
Showing 28 changed files with 164 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dockers-gateway-mirror-image.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# 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.
Expand Down
13 changes: 13 additions & 0 deletions apis/grpc/v1/mirror/mirror.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// 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.
// 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 (
Expand Down
15 changes: 15 additions & 0 deletions charts/vald/values/multi-vald/dev-vald-01.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#
# 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.
# 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
Expand Down
15 changes: 15 additions & 0 deletions charts/vald/values/multi-vald/dev-vald-02.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#
# 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.
# 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
Expand Down
15 changes: 15 additions & 0 deletions charts/vald/values/multi-vald/dev-vald-03.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#
# 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.
# 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:
Expand Down
15 changes: 15 additions & 0 deletions charts/vald/values/multi-vald/dev-vald-with-mirror.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#
# 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.
# 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.
Expand Down
2 changes: 1 addition & 1 deletion cmd/gateway/mirror/main.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// 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.
Expand Down
2 changes: 1 addition & 1 deletion cmd/gateway/mirror/sample.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# 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.
Expand Down
2 changes: 1 addition & 1 deletion dockers/gateway/mirror/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# 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.
Expand Down
13 changes: 13 additions & 0 deletions internal/client/v1/client/mirror/mirror.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// 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.
// 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 (
Expand Down
13 changes: 13 additions & 0 deletions internal/client/v1/client/mirror/option.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// 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.
// 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 (
Expand Down
10 changes: 5 additions & 5 deletions internal/config/mirror.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// 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.
Expand All @@ -20,13 +20,13 @@ 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"`
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/gateway/mirror/config/config.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// 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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/gateway/mirror/handler/doc.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// 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.
Expand Down
7 changes: 5 additions & 2 deletions pkg/gateway/mirror/handler/grpc/handler.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// 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.
Expand Down Expand Up @@ -795,7 +795,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()
Expand Down
13 changes: 13 additions & 0 deletions pkg/gateway/mirror/handler/grpc/handler_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// 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.
// 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 (
Expand Down
13 changes: 13 additions & 0 deletions pkg/gateway/mirror/handler/grpc/mock_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// 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.
// 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 (
Expand Down
2 changes: 1 addition & 1 deletion pkg/gateway/mirror/handler/grpc/option.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// 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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/gateway/mirror/handler/rest/handler.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// 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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/gateway/mirror/handler/rest/option.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// 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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/gateway/mirror/router/option.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// 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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/gateway/mirror/router/router.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// 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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/gateway/mirror/service/doc.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// 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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/gateway/mirror/service/gateway.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// 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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/gateway/mirror/service/mirror.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// 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.
Expand Down
13 changes: 13 additions & 0 deletions pkg/gateway/mirror/service/mirror_option.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
// 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.
// 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 (
Expand Down
2 changes: 1 addition & 1 deletion pkg/gateway/mirror/service/option.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// 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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/gateway/mirror/usecase/vald.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// 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.
Expand Down

0 comments on commit f605563

Please sign in to comment.