-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add all DocumentService/SearchService function stubs.
Signed-off-by: Finn Carroll <[email protected]>
- Loading branch information
1 parent
56c8940
commit 06d1aa2
Showing
3 changed files
with
136 additions
and
1 deletion.
There are no files selected for viewing
88 changes: 88 additions & 0 deletions
88
server/src/main/java/org/opensearch/grpc/services/DocumentServiceImpl.java
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,88 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.grpc.services; | ||
|
||
import io.grpc.stub.StreamObserver; | ||
import opensearch.protos.BulkRequest; | ||
import opensearch.protos.BulkResponse; | ||
import opensearch.protos.DeleteDocumentRequest; | ||
import opensearch.protos.DeleteDocumentResponse; | ||
import opensearch.protos.GetDocumentRequest; | ||
import opensearch.protos.GetDocumentResponse; | ||
import opensearch.protos.GetDocumentSourceRequest; | ||
import opensearch.protos.GetDocumentSourceResponse; | ||
import opensearch.protos.IndexBulkRequest; | ||
import opensearch.protos.IndexBulkResponse; | ||
import opensearch.protos.IndexDocumentCreateIdRequest; | ||
import opensearch.protos.IndexDocumentCreateIdResponse; | ||
import opensearch.protos.IndexDocumentIdRequest; | ||
import opensearch.protos.IndexDocumentIdResponse; | ||
import opensearch.protos.IndexDocumentRequest; | ||
import opensearch.protos.IndexDocumentResponse; | ||
import opensearch.protos.UpdateDocumentRequest; | ||
import opensearch.protos.UpdateDocumentResponse; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import org.opensearch.client.node.NodeClient; | ||
|
||
import opensearch.proto.services.DocumentServiceGrpc; | ||
|
||
public class DocumentServiceImpl extends DocumentServiceGrpc.DocumentServiceImplBase { | ||
private static final Logger logger = LogManager.getLogger(DocumentServiceImpl.class); | ||
private final NodeClient client; | ||
|
||
public DocumentServiceImpl(NodeClient client) { | ||
this.client = client; | ||
} | ||
|
||
@Override | ||
public void indexDocument(IndexDocumentRequest request, StreamObserver<IndexDocumentResponse> responseObserver) { | ||
super.indexDocument(request, responseObserver); | ||
} | ||
|
||
@Override | ||
public void indexDocumentId(IndexDocumentIdRequest request, StreamObserver<IndexDocumentIdResponse> responseObserver) { | ||
super.indexDocumentId(request, responseObserver); | ||
} | ||
|
||
@Override | ||
public void indexDocumentCreateId(IndexDocumentCreateIdRequest request, StreamObserver<IndexDocumentCreateIdResponse> responseObserver) { | ||
super.indexDocumentCreateId(request, responseObserver); | ||
} | ||
|
||
@Override | ||
public void bulk(BulkRequest request, StreamObserver<BulkResponse> responseObserver) { | ||
super.bulk(request, responseObserver); | ||
} | ||
|
||
@Override | ||
public void indexBulk(IndexBulkRequest request, StreamObserver<IndexBulkResponse> responseObserver) { | ||
super.indexBulk(request, responseObserver); | ||
} | ||
|
||
@Override | ||
public void deleteDocument(DeleteDocumentRequest request, StreamObserver<DeleteDocumentResponse> responseObserver) { | ||
super.deleteDocument(request, responseObserver); | ||
} | ||
|
||
@Override | ||
public void updateDocument(UpdateDocumentRequest request, StreamObserver<UpdateDocumentResponse> responseObserver) { | ||
super.updateDocument(request, responseObserver); | ||
} | ||
|
||
@Override | ||
public void getDocument(GetDocumentRequest request, StreamObserver<GetDocumentResponse> responseObserver) { | ||
super.getDocument(request, responseObserver); | ||
} | ||
|
||
@Override | ||
public void getDocumentSource(GetDocumentSourceRequest request, StreamObserver<GetDocumentSourceResponse> responseObserver) { | ||
super.getDocumentSource(request, responseObserver); | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
server/src/main/java/org/opensearch/grpc/services/SearchServiceImpl.java
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 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.grpc.services; | ||
|
||
import io.grpc.stub.StreamObserver; | ||
|
||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import org.opensearch.client.node.NodeClient; | ||
|
||
import opensearch.proto.services.SearchServiceGrpc; | ||
import opensearch.protos.ExplainRequest; | ||
import opensearch.protos.ExplainResponse; | ||
import opensearch.protos.IndexSearchRequest; | ||
import opensearch.protos.IndexSearchResponse; | ||
import opensearch.protos.SearchRequest; | ||
import opensearch.protos.SearchResponse; | ||
|
||
public class SearchServiceImpl extends SearchServiceGrpc.SearchServiceImplBase { | ||
private static final Logger logger = LogManager.getLogger(SearchServiceImpl.class); | ||
private final NodeClient client; | ||
|
||
public SearchServiceImpl(NodeClient client) { | ||
this.client = client; | ||
} | ||
|
||
@Override | ||
public void search(SearchRequest request, StreamObserver<SearchResponse> responseObserver) { | ||
super.search(request, responseObserver); | ||
} | ||
|
||
@Override | ||
public void indexSearch(IndexSearchRequest request, StreamObserver<IndexSearchResponse> responseObserver) { | ||
super.indexSearch(request, responseObserver); | ||
} | ||
|
||
@Override | ||
public void explain(ExplainRequest request, StreamObserver<ExplainResponse> responseObserver) { | ||
super.explain(request, responseObserver); | ||
} | ||
} |
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