-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Signed-off-by: kpango <kpango@vdaas.org>
Showing
28 changed files
with
561 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# | ||
# Copyright (C) 2019-2024 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. | ||
# | ||
name: Update Actions version | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
jobs: | ||
dump-contexts-to-log: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: vdaas/vald/.github/actions/dump-context@main | ||
update-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.DISPATCH_TOKEN }} | ||
- name: Set Git config | ||
run: | | ||
git config --global --add safe.directory ${GITHUB_WORKSPACE} | ||
- uses: crazy-max/ghaction-import-gpg@v6 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
git_user_signingkey: true | ||
git_commit_gpgsign: true | ||
- name: Run update command | ||
run: | | ||
make update/actions | ||
- name: Check difference | ||
id: check_diff | ||
run: | | ||
if git diff --quiet --exit-code; then | ||
echo "Nothing updated" | ||
else | ||
git diff && git status | ||
echo "HAS_GIT_DIFF=true" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Create PR | ||
if: ${{ steps.check_diff.outputs.HAS_GIT_DIFF == 'true' }} | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
author: "${{ secrets.DISPATCH_USER }} <vald@vdaas.org>" | ||
token: ${{ secrets.DISPATCH_TOKEN }} | ||
committer: "${{ secrets.DISPATCH_USER }} <vald@vdaas.org>" | ||
signoff: true | ||
delete-branch: true | ||
base: main | ||
title: "Update Actions dependency" | ||
body: "Automated pull request to update Actions." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// Copyright (C) 2019-2024 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. | ||
// | ||
mod common; | ||
mod index; | ||
mod insert; | ||
mod remove; | ||
mod search; | ||
mod update; | ||
mod upsert; | ||
|
||
#[derive(Default, Debug)] | ||
pub struct Agent { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// Copyright (C) 2019-2024 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. | ||
// | ||
#[macro_export] | ||
macro_rules! stream_type { | ||
($t:ty) => { | ||
std::pin::Pin<Box<dyn tokio_stream::Stream<Item = std::result::Result<$t, tonic::Status>> + Send>> | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// Copyright (C) 2019-2024 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. | ||
// | ||
use proto::{ | ||
payload::v1::{insert, object}, | ||
vald::v1::insert_server, | ||
}; | ||
#[tonic::async_trait] | ||
impl insert_server::Insert for super::Agent { | ||
async fn insert( | ||
&self, | ||
request: tonic::Request<insert::Request>, | ||
) -> std::result::Result<tonic::Response<object::Location>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " Server streaming response type for the StreamInsert method."] | ||
type StreamInsertStream = crate::stream_type!(object::StreamLocation); | ||
|
||
#[doc = " A method to add new multiple vectors by bidirectional streaming.\n"] | ||
async fn stream_insert( | ||
&self, | ||
request: tonic::Request<tonic::Streaming<insert::Request>>, | ||
) -> std::result::Result<tonic::Response<Self::StreamInsertStream>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " A method to add new multiple vectors in a single request.\n"] | ||
async fn multi_insert( | ||
&self, | ||
request: tonic::Request<insert::MultiRequest>, | ||
) -> std::result::Result<tonic::Response<object::Locations>, tonic::Status> { | ||
todo!() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// | ||
// Copyright (C) 2019-2024 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. | ||
// | ||
use proto::{ | ||
payload::v1::{object, remove}, | ||
vald::v1::remove_server, | ||
}; | ||
|
||
#[tonic::async_trait] | ||
impl remove_server::Remove for super::Agent { | ||
async fn remove( | ||
&self, | ||
request: tonic::Request<remove::Request>, | ||
) -> std::result::Result<tonic::Response<object::Location>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " A method to remove an indexed vector based on timestamp.\n"] | ||
async fn remove_by_timestamp( | ||
&self, | ||
request: tonic::Request<remove::TimestampRequest>, | ||
) -> std::result::Result<tonic::Response<object::Locations>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " Server streaming response type for the StreamRemove method."] | ||
type StreamRemoveStream = crate::stream_type!(object::StreamLocation); | ||
|
||
#[doc = " A method to remove multiple indexed vectors by bidirectional streaming.\n"] | ||
async fn stream_remove( | ||
&self, | ||
request: tonic::Request<tonic::Streaming<remove::Request>>, | ||
) -> std::result::Result<tonic::Response<Self::StreamRemoveStream>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " A method to remove multiple indexed vectors in a single request.\n"] | ||
async fn multi_remove( | ||
&self, | ||
request: tonic::Request<remove::MultiRequest>, | ||
) -> std::result::Result<tonic::Response<object::Locations>, tonic::Status> { | ||
todo!() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
// | ||
// Copyright (C) 2019-2024 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. | ||
// | ||
use proto::{payload::v1::search, vald::v1::search_server}; | ||
|
||
#[tonic::async_trait] | ||
impl search_server::Search for super::Agent { | ||
async fn search( | ||
&self, | ||
request: tonic::Request<search::Request>, | ||
) -> Result<tonic::Response<search::Response>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " A method to search indexed vectors by ID.\n"] | ||
async fn search_by_id( | ||
&self, | ||
request: tonic::Request<search::IdRequest>, | ||
) -> Result<tonic::Response<search::Response>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " Server streaming response type for the StreamSearch method."] | ||
type StreamSearchStream = crate::stream_type!(search::StreamResponse); | ||
|
||
#[doc = " A method to search indexed vectors by multiple vectors.\n"] | ||
async fn stream_search( | ||
&self, | ||
request: tonic::Request<tonic::Streaming<search::Request>>, | ||
) -> std::result::Result<tonic::Response<Self::StreamSearchStream>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " Server streaming response type for the StreamSearchByID method."] | ||
type StreamSearchByIDStream = crate::stream_type!(search::StreamResponse); | ||
|
||
#[doc = " A method to search indexed vectors by multiple IDs.\n"] | ||
async fn stream_search_by_id( | ||
&self, | ||
request: tonic::Request<tonic::Streaming<search::IdRequest>>, | ||
) -> std::result::Result<tonic::Response<Self::StreamSearchByIDStream>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " A method to search indexed vectors by multiple vectors in a single request.\n"] | ||
async fn multi_search( | ||
&self, | ||
request: tonic::Request<search::MultiRequest>, | ||
) -> std::result::Result<tonic::Response<search::Responses>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " A method to search indexed vectors by multiple IDs in a single request.\n"] | ||
async fn multi_search_by_id( | ||
&self, | ||
request: tonic::Request<search::MultiIdRequest>, | ||
) -> std::result::Result<tonic::Response<search::Responses>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " A method to linear search indexed vectors by a raw vector.\n"] | ||
async fn linear_search( | ||
&self, | ||
request: tonic::Request<search::Request>, | ||
) -> std::result::Result<tonic::Response<search::Response>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " A method to linear search indexed vectors by ID.\n"] | ||
async fn linear_search_by_id( | ||
&self, | ||
request: tonic::Request<search::IdRequest>, | ||
) -> std::result::Result<tonic::Response<search::Response>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " Server streaming response type for the StreamLinearSearch method."] | ||
type StreamLinearSearchStream = crate::stream_type!(search::StreamResponse); | ||
|
||
#[doc = " A method to linear search indexed vectors by multiple vectors.\n"] | ||
async fn stream_linear_search( | ||
&self, | ||
request: tonic::Request<tonic::Streaming<search::Request>>, | ||
) -> std::result::Result<tonic::Response<Self::StreamLinearSearchStream>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " Server streaming response type for the StreamLinearSearchByID method."] | ||
type StreamLinearSearchByIDStream = crate::stream_type!(search::StreamResponse); | ||
|
||
#[doc = " A method to linear search indexed vectors by multiple IDs.\n"] | ||
async fn stream_linear_search_by_id( | ||
&self, | ||
request: tonic::Request<tonic::Streaming<search::IdRequest>>, | ||
) -> std::result::Result<tonic::Response<Self::StreamLinearSearchByIDStream>, tonic::Status> | ||
{ | ||
todo!() | ||
} | ||
|
||
#[doc = " A method to linear search indexed vectors by multiple vectors in a single\n request.\n"] | ||
async fn multi_linear_search( | ||
&self, | ||
request: tonic::Request<search::MultiRequest>, | ||
) -> std::result::Result<tonic::Response<search::Responses>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " A method to linear search indexed vectors by multiple IDs in a single\n request.\n"] | ||
async fn multi_linear_search_by_id( | ||
&self, | ||
request: tonic::Request<search::MultiIdRequest>, | ||
) -> std::result::Result<tonic::Response<search::Responses>, tonic::Status> { | ||
todo!() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// | ||
// Copyright (C) 2019-2024 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. | ||
// | ||
use proto::{ | ||
payload::v1::{object, update}, | ||
vald::v1::update_server, | ||
}; | ||
|
||
#[tonic::async_trait] | ||
impl update_server::Update for super::Agent { | ||
async fn update( | ||
&self, | ||
request: tonic::Request<update::Request>, | ||
) -> std::result::Result<tonic::Response<object::Location>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " Server streaming response type for the StreamUpdate method."] | ||
type StreamUpdateStream = crate::stream_type!(object::StreamLocation); | ||
|
||
#[doc = " A method to update multiple indexed vectors by bidirectional streaming.\n"] | ||
async fn stream_update( | ||
&self, | ||
request: tonic::Request<tonic::Streaming<update::Request>>, | ||
) -> std::result::Result<tonic::Response<Self::StreamUpdateStream>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " A method to update multiple indexed vectors in a single request.\n"] | ||
async fn multi_update( | ||
&self, | ||
request: tonic::Request<update::MultiRequest>, | ||
) -> std::result::Result<tonic::Response<object::Locations>, tonic::Status> { | ||
todo!() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// | ||
// Copyright (C) 2019-2024 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. | ||
// | ||
use proto::{ | ||
payload::v1::{object, upsert}, | ||
vald::v1::upsert_server, | ||
}; | ||
|
||
#[tonic::async_trait] | ||
impl upsert_server::Upsert for super::Agent { | ||
async fn upsert( | ||
&self, | ||
request: tonic::Request<upsert::Request>, | ||
) -> std::result::Result<tonic::Response<object::Location>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " Server streaming response type for the StreamUpsert method."] | ||
type StreamUpsertStream = crate::stream_type!(object::StreamLocation); | ||
|
||
#[doc = " A method to insert/update multiple vectors by bidirectional streaming.\n"] | ||
async fn stream_upsert( | ||
&self, | ||
request: tonic::Request<tonic::Streaming<upsert::Request>>, | ||
) -> std::result::Result<tonic::Response<Self::StreamUpsertStream>, tonic::Status> { | ||
todo!() | ||
} | ||
|
||
#[doc = " A method to insert/update multiple vectors in a single request.\n"] | ||
async fn multi_upsert( | ||
&self, | ||
request: tonic::Request<upsert::MultiRequest>, | ||
) -> std::result::Result<tonic::Response<object::Locations>, tonic::Status> { | ||
todo!() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
61.6.0 | ||
61.6.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
6.1.0 |