-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove counter and add documents feature - Leave counter feature for reference * Call ListDocuments to display a list of documents on the screen
- Loading branch information
1 parent
b29cec4
commit e006e3b
Showing
25 changed files
with
13,466 additions
and
90 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
REACT_APP_ADMIN_ADDR=http://localhost:8080 |
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,34 @@ | ||
version: '3.3' | ||
|
||
services: | ||
envoy: | ||
build: | ||
context: ./ | ||
dockerfile: ./envoy.Dockerfile | ||
image: 'grpcweb:envoy' | ||
container_name: 'envoy' | ||
restart: always | ||
ports: | ||
- '8080:8080' | ||
- '9901:9901' | ||
command: ['/etc/envoy/envoy.yaml'] | ||
depends_on: | ||
- yorkie | ||
# If you're using Mac or Windows, this special domain name("host.docker.internal" which makes containers able to connect to the host) | ||
# is supported by default. | ||
# But if you're using Linux and want an envoy container to communicate with the host, | ||
# it may help to define "host.docker.internal" in extra_hosts. | ||
# (Actually, other hostnames are available, but in that case you should update clusters[].host configurations of envoy.yaml) | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" | ||
yorkie: | ||
image: 'yorkieteam/yorkie:admin-api' | ||
container_name: 'yorkie' | ||
command: [ | ||
'agent', | ||
'--enable-pprof', | ||
] | ||
restart: always | ||
ports: | ||
- '11101:11101' | ||
- '11102:11102' |
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,7 @@ | ||
FROM envoyproxy/envoy:v1.19.0 | ||
|
||
COPY ./envoy.yaml /etc/envoy/envoy.yaml | ||
|
||
ENTRYPOINT ["/usr/local/bin/envoy", "-c"] | ||
|
||
CMD /etc/envoy/envoy.yaml |
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,59 @@ | ||
admin: | ||
access_log_path: /tmp/admin_access.log | ||
address: | ||
socket_address: { address: 0.0.0.0, port_value: 9901 } | ||
|
||
static_resources: | ||
listeners: | ||
- name: listener_0 | ||
address: | ||
socket_address: { address: 0.0.0.0, port_value: 8080 } | ||
filter_chains: | ||
- filters: | ||
- name: envoy.filters.network.http_connection_manager | ||
typed_config: | ||
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager | ||
stat_prefix: ingress_http | ||
route_config: | ||
name: local_route | ||
virtual_hosts: | ||
- name: local_service | ||
domains: ["*"] | ||
routes: | ||
- match: { prefix: "/" } | ||
route: | ||
cluster: yorkie_service | ||
# https://github.com/grpc/grpc-web/issues/361 | ||
max_stream_duration: | ||
grpc_timeout_header_max: 0s | ||
cors: | ||
allow_origin_string_match: | ||
- prefix: "*" | ||
allow_methods: GET, PUT, DELETE, POST, OPTIONS | ||
allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout,authorization | ||
max_age: "1728000" | ||
expose_headers: custom-header-1,grpc-status,grpc-message | ||
http_filters: | ||
- name: envoy.filters.http.grpc_web | ||
- name: envoy.filters.http.cors | ||
- name: envoy.filters.http.router | ||
clusters: | ||
- name: yorkie_service | ||
connect_timeout: 0.25s | ||
type: logical_dns | ||
http2_protocol_options: {} | ||
lb_policy: round_robin | ||
# Input the address which envoy can connect to as a yorkie server. | ||
# When you want envoy container to communicate with your host machine, you should set as the following | ||
# - Windows/Mac: Input host.docker.internal | ||
# - Linux: an IP address of the host machine or docker-0 interface or some addresses defined in extra hosts of docker-compose.yml | ||
# you can simply use the yorkie container name(e.g. yorkie) in docker-compose whatever your OS is. | ||
load_assignment: | ||
cluster_name: cluster_0 | ||
endpoints: | ||
- lb_endpoints: | ||
- endpoint: | ||
address: | ||
socket_address: | ||
address: host.docker.internal | ||
port_value: 11101 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 was deleted.
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
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,34 @@ | ||
/* | ||
* Copyright 2022 The Yorkie Authors. All rights reserved. | ||
* | ||
* 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 | ||
* | ||
* http://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. | ||
*/ | ||
syntax = "proto3"; | ||
|
||
package api; | ||
|
||
import "resources.proto"; | ||
|
||
// Admin is a service that provides a API for Admin. | ||
service Admin { | ||
rpc ListDocuments (ListDocumentsRequest) returns (ListDocumentsResponse) {} | ||
} | ||
|
||
message ListDocumentsRequest { | ||
string previous_id = 1; | ||
int32 page_size = 2; | ||
} | ||
|
||
message ListDocumentsResponse { | ||
repeated DocumentSummary documents = 1; | ||
} |
Oops, something went wrong.