Skip to content

Commit

Permalink
Revert "Enable ingress resource in the getStarted document (#2211)"
Browse files Browse the repository at this point in the history
This reverts commit a7a746f.
  • Loading branch information
ykadowak committed Nov 30, 2023
1 parent d8781b1 commit 391525d
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 130 deletions.
16 changes: 5 additions & 11 deletions docs/tutorial/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ Please make sure these functions are available.<br>
The configuration of Kubernetes Ingress is depended on your Kubernetes cluster's provider.
Please refer to on yourself.

In the following example, we create the Kubernetes cluster using [k3d](https://k3d.io/), that the internal port 80 (where the traefik ingress controller is listening on) is exposed on the host system.

```bash
k3d cluster create -p 8081:80@loadbalancer
```

The way to deploy Kubernetes Metrics Service is here:

```bash
Expand Down Expand Up @@ -114,7 +108,7 @@ In this tutorial, you will deploy the basic configuration of Vald that is consis
enabled: true
# TODO: Set your ingress host.
host: localhost
# TODO: Set annotations which you have to set for your Ingress resource.
# TODO: Set annotations which you have to set for your k8s cluster.
annotations:
...
```
Expand Down Expand Up @@ -170,8 +164,8 @@ In this tutorial, you will deploy the basic configuration of Vald that is consis
<details><summary>Example output</summary><br>

```bash
NAME CLASS HOSTS ADDRESS PORTS AGE
vald-lb-gateway-ingress traefik localhost 192.168.16.2 80 7m43s
NAME CLASS HOSTS ADDRESS PORTS AGE
vald-lb-gateway-ingress <none> localhost 192.168.16.2 80 7m43s
```

</details>
Expand Down Expand Up @@ -259,9 +253,9 @@ If you are interested, please refer to [SDKs](../user-guides/sdks.md).<br>
"github.com/kpango/glg"
"github.com/vdaas/vald-client-go/v1/payload"
"github.com/vdaas/vald-client-go/v1/vald"
"gonum.org/v1/hdf5"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)
```

Expand Down Expand Up @@ -329,7 +323,7 @@ If you are interested, please refer to [SDKs](../user-guides/sdks.md).<br>
```go
ctx := context.Background()
conn, err := grpc.DialContext(ctx, grpcServerAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.DialContext(ctx, grpcServerAddr, grpc.WithInsecure())
if err != nil {
glg.Fatal(err)
}
Expand Down
103 changes: 51 additions & 52 deletions docs/tutorial/vald-agent-standalone-on-k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ This chapter uses [NGT](https://github.com/yahoojapan/ngt) as Vald Agent to perf
"github.com/kpango/fuid"
"github.com/kpango/glg"
agent "github.com/vdaas/vald-client-go/v1/agent/core"
"github.com/vdaas/vald-client-go/v1/payload"
"github.com/vdaas/vald-client-go/v1/vald"
"github.com/vdaas/vald-client-go/v1/payload"
"gonum.org/v1/hdf5"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)
```

Expand Down Expand Up @@ -236,7 +236,7 @@ This chapter uses [NGT](https://github.com/yahoojapan/ngt) as Vald Agent to perf
```go
ctx := context.Background()
conn, err := grpc.DialContext(ctx, grpcServerAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.DialContext(ctx, grpcServerAddr, grpc.WithInsecure())
if err != nil {
glg.Fatal(err)
}
Expand Down Expand Up @@ -284,23 +284,21 @@ This chapter uses [NGT](https://github.com/yahoojapan/ngt) as Vald Agent to perf
</details>
- [Optional] Indexing manually instead of waiting for auto indexing.
- [Optional] Indexing manually instead of waiting for auto indexing
You can set Agent NGT configuration `auto_index_duration_limit` and `auto_index_check_duration` for auto indexing.
In this example, you can create index manually using `CreateAndSaveIndex()` method in the client library
<details><summary>example code</summary><br>
<details><summary>example code</summary><br>
```go
_, err = client.CreateAndSaveIndex(ctx, &payload.Control_CreateIndexRequest{
PoolSize: uint32(insertCount),
})
if err != nil {
glg.Fatal(err)
}
```
```go
_, err = client.CreateAndSaveIndex(ctx, &payload.Control_CreateIndexRequest{
PoolSize: uint32(insertCount),
})
if err != nil {
glg.Fatal(err)
}
```
</details>
</details>
1. Search
Expand Down Expand Up @@ -335,48 +333,49 @@ This chapter uses [NGT](https://github.com/yahoojapan/ngt) as Vald Agent to perf
1. Remove
- Remove indexed 400 training datasets from the Vald agent.
<details><summary>example code</summary><br>
```go
for i := range ids [:insertCount] {
_, err := client.Remove(ctx, &payload.Remove_Request{
Id: &payload.Object_ID{
Id: ids[i],
},
})
if err != nil {
glg.Fatal(err)
}
if i%10 == 0 {
glg.Infof("Removed %d", i)
}
}
```
</details>
- Remove from the index manually instead of waiting for auto indexing.
The removed vectors still exist in the NGT graph index before the SaveIndex (or CreateAndSaveIndex) API is called.
If you run the below code, the indexes will be removed completely from the Vald Agent NGT graph and the Backup file.
- Remove indexed 400 training datasets from the Vald agent.
<details><summary>example code</summary><br>
```go
for i := range ids [:insertCount] {
_, err := client.Remove(ctx, &payload.Remove_Request{
Id: &payload.Object_ID{
Id: ids[i],
},
})
if err != nil {
glg.Fatal(err)
}
if i%10 == 0 {
glg.Infof("Removed %d", i)
}
}
```
</details>
- Remove from the index manually instead of waiting for auto indexing.
The removed vectors still exist in the NGT graph index before the SaveIndex (or CreateAndSaveIndex) API is called.
If you run the below code, the indexes will be removed completely from the Vald Agent NGT graph and the Backup file.
<details><summary>example code</summary><br>
```go
_, err = client.SaveIndex(ctx, &payload.Empty{})
if err != nil {
glg.Fatal(err)
}
```
</details>
<details><summary>example code</summary><br>
```go
_, err = client.SaveIndex(ctx, &payload.Empty{})
if err != nil {
glg.Fatal(err)
}
```
</details>
</details>
<div class="caution">
It would be best to run CreateIndex() after Insert() without waiting for auto-indexing in your client code, even you can wait for the finishing auto createIndex function, which sometimes takes a long time.
The backup files (e.g., ngt-meta.kvsdb) will be in your mount directory when vald-agent-ngt finishes indexing.
</div>
<div class="warning">
If you use Go(v1.16~) and catch the error like `missing go.sum entry to add it` when running `go run main.go`, please run `go mod tidy` and retry.
This error comes from Go Command Changes of Go 1.16 Release Notes.(Please refer to https://golang.org/doc/go1.16#go-command for more details).
Expand Down
3 changes: 1 addition & 2 deletions example/client/agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"github.com/vdaas/vald-client-go/v1/vald"
"gonum.org/v1/hdf5"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)

const (
Expand Down Expand Up @@ -66,7 +65,7 @@ func main() {
ctx := context.Background()

// Create a Vald Agent client for connecting to the Vald cluster.
conn, err := grpc.DialContext(ctx, grpcServerAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.DialContext(ctx, grpcServerAddr, grpc.WithInsecure())
if err != nil {
glg.Fatal(err)
}
Expand Down
39 changes: 19 additions & 20 deletions example/client/go.mod
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
module github.com/vdaas/vald/example/client

go 1.21
go 1.20

replace (
github.com/envoyproxy/protoc-gen-validate => github.com/envoyproxy/protoc-gen-validate v1.0.2
github.com/goccy/go-json => github.com/goccy/go-json v0.10.2
github.com/golang/protobuf => github.com/golang/protobuf v1.5.3
github.com/kpango/glg => github.com/kpango/glg v1.6.15
github.com/pkg/sftp => github.com/pkg/sftp v1.13.6
golang.org/x/crypto => golang.org/x/crypto v0.14.0
golang.org/x/net => golang.org/x/net v0.17.0
golang.org/x/text => golang.org/x/text v0.13.0
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b
google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b
google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b
google.golang.org/grpc => google.golang.org/grpc v1.58.3
github.com/pkg/sftp => github.com/pkg/sftp v1.13.5
golang.org/x/crypto => golang.org/x/crypto v0.10.0
golang.org/x/net => golang.org/x/net v0.11.0
golang.org/x/text => golang.org/x/text v0.10.0
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20230626202813-9b080da550b3
google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20230626202813-9b080da550b3
google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20230626202813-9b080da550b3
google.golang.org/grpc => google.golang.org/grpc v1.56.1
google.golang.org/protobuf => google.golang.org/protobuf v1.31.0
gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1
Expand All @@ -23,22 +23,21 @@ replace (
require (
github.com/kpango/fuid v0.0.0-20221203053508-503b5ad89aa1
github.com/kpango/glg v1.6.14
github.com/vdaas/vald-client-go v1.7.8
github.com/vdaas/vald-client-go v1.7.6
gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946
google.golang.org/grpc v1.58.3
google.golang.org/grpc v1.55.0
)

require (
github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect
github.com/envoyproxy/protoc-gen-validate v0.10.1 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/kpango/fastime v1.1.9 // indirect
github.com/planetscale/vtprotobuf v0.5.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a // indirect
google.golang.org/protobuf v1.31.0 // indirect
golang.org/x/net v0.11.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/text v0.10.0 // indirect
google.golang.org/genproto v0.0.0-20230525234025-438c736192d0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230526203410-71b5a4ffd15e // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230526203410-71b5a4ffd15e // indirect
google.golang.org/protobuf v1.30.0 // indirect
)
2 changes: 1 addition & 1 deletion example/client/go.mod.default
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/vdaas/vald/example/client

go 1.21
go 1.20

replace (
github.com/envoyproxy/protoc-gen-validate => github.com/envoyproxy/protoc-gen-validate latest
Expand Down
46 changes: 16 additions & 30 deletions example/client/go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA=
github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
Expand All @@ -7,47 +6,34 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
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/glg v1.6.15 h1:nw0xSxpSyrDIWHeb3dvnE08PW+SCbK+aYFETT75IeLA=
github.com/kpango/glg v1.6.15/go.mod h1:cmsc7Yeu8AS3wHLmN7bhwENXOpxfq+QoqxCIk2FneRk=
github.com/planetscale/vtprotobuf v0.5.0 h1:l8PXm6Colok5z6qQLNhAj2Jq5BfoMTIHxLER5a6nDqM=
github.com/planetscale/vtprotobuf v0.5.0/go.mod h1:wm1N3qk9G/4+VM1WhpkLbvY/d8+0PbwYYpP5P5VhTks=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/vdaas/vald-client-go v1.7.8 h1:QguvA8BTj8o3Xe2FfmSO8ipOBTTdXoTB1KnSL52+IvM=
github.com/vdaas/vald-client-go v1.7.8/go.mod h1:kZ4GSvNGrCIaD3HfA7quabWM8Z10roUzT4C4xgCSTqU=
github.com/vdaas/vald-client-go v1.7.6 h1:rvd7Rt6Xx917r9Yy9sB4wnYCsguegXXaQUME9JquxGU=
github.com/vdaas/vald-client-go v1.7.6/go.mod h1:rJcmCO0yuJEb4vd8jh7aDCgiZr7b10g3SYvfB9wt1O8=
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU=
golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ=
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58=
golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 h1:vJpL69PeUullhJyKtTjHjENEmZU3BkO4e+fod7nKzgM=
gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946/go.mod h1:BQUWDHIAygjdt1HnUPQ0eWqLN2n5FwJycrpYUVUOx2I=
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA=
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI=
google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k=
google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc=
google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ=
google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
google.golang.org/genproto v0.0.0-20230626202813-9b080da550b3 h1:Yofj1/U0xc/Zi5KEpoIxm51I2f85X+eGyY4YzAujRdw=
google.golang.org/genproto v0.0.0-20230626202813-9b080da550b3/go.mod h1:xZnkP7mREFX5MORlOPEzLMr+90PPZQ2QWzrVTWfAq64=
google.golang.org/genproto/googleapis/api v0.0.0-20230626202813-9b080da550b3 h1:wl7z+A0jkB3Rl8Hz74SqGDlnnn5VlL2CV+9UTdZOo00=
google.golang.org/genproto/googleapis/api v0.0.0-20230626202813-9b080da550b3/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230626202813-9b080da550b3 h1:QJuqz7YzNTyKDspkp2lrzqtq4lf2AhUSpXTsGP5SbLw=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230626202813-9b080da550b3/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA=
google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ=
google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
7 changes: 3 additions & 4 deletions example/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"github.com/vdaas/vald-client-go/v1/vald"
"gonum.org/v1/hdf5"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)

const (
Expand All @@ -42,11 +41,11 @@ var (
func init() {
/**
Path option specifies hdf file by path. Default value is `fashion-mnist-784-euclidean.hdf5`.
Addr option specifies grpc server address. Default value is `127.0.0.1:8081`.
Addr option specifies grpc server address. Default value is `127.0.0.1:8080`.
Wait option specifies indexing wait time (in seconds). Default value is `60`.
**/
flag.StringVar(&datasetPath, "path", "fashion-mnist-784-euclidean.hdf5", "dataset path")
flag.StringVar(&grpcServerAddr, "addr", "localhost:8081", "gRPC server address")
flag.StringVar(&grpcServerAddr, "addr", "localhost:8080", "gRPC server address")
flag.UintVar(&indexingWaitSeconds, "wait", 60, "indexing wait seconds")
flag.Parse()
}
Expand All @@ -63,7 +62,7 @@ func main() {
ctx := context.Background()

// Create a Vald client for connecting to the Vald cluster.
conn, err := grpc.DialContext(ctx, grpcServerAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.DialContext(ctx, grpcServerAddr, grpc.WithInsecure())
if err != nil {
glg.Fatal(err)
}
Expand Down
Loading

0 comments on commit 391525d

Please sign in to comment.