@@ -16,9 +16,6 @@ the recommendation is not to use it yet.
16
16
17
17
## Synopsis
18
18
19
- ` serve-grpc ` is a command in the [ senzing-tools] suite of tools.
20
- This command is a [ gRPC] server application that supports requests to the Senzing SDK via network access.
21
-
22
19
[ ![ Go Reference Badge]] [ Package reference ]
23
20
[ ![ Go Report Card Badge]] [ Go Report Card ]
24
21
[ ![ License Badge]] [ License ]
@@ -39,85 +36,16 @@ Senzing SDKs for accessing the gRPC server:
39
36
1 . Go: [ sz-sdk-go-grpc]
40
37
1 . Python: [ sz-sdk-python-grpc]
41
38
42
- A simple demonstration using ` senzing-tools ` and a SQLite database.
43
-
44
- ``` console
45
- export LD_LIBRARY_PATH=/opt/senzing/er/lib/
46
- export SENZING_TOOLS_DATABASE_URL=sqlite3://na:na@nowhere/tmp/sqlite/G2C.db
47
- senzing-tools init-database
48
- senzing-tools serve-grpc --enable-all
49
-
50
- ```
51
-
52
39
## Install
53
40
54
- 1 . The ` serve-grpc ` command is installed with the [ senzing-tools] suite of tools.
55
- See [ senzing-tools install] ( https://github.com/senzing-garage/senzing-tools#install ) .
56
-
57
41
## Use
58
42
59
- ``` console
60
- export LD_LIBRARY_PATH=/opt/senzing/er/lib/
61
- senzing-tools serve-grpc [flags]
62
- ```
63
-
64
- 1 . For options and flags:
65
- 1 . [ Online documentation] ( https://hub.senzing.com/senzing-tools/senzing-tools_serve-grpc.html )
66
- 1 . Runtime documentation:
67
-
68
- ``` console
69
- export LD_LIBRARY_PATH=/opt/senzing/er/lib/
70
- senzing-tools serve-grpc --help
71
- ```
72
-
73
- 1. In addition to the following simple usage examples, there are additional [Examples](docs/examples.md).
74
-
75
- ### Using command line options
76
-
77
- 1. :pencil2: Specify database using command line option.
43
+ 1 . Docker container with internal, ephemeral database and
44
+ gRPC accessable on port 8261.
78
45
Example:
79
46
80
47
``` console
81
- export LD_LIBRARY_PATH=/opt/senzing/er/lib/
82
- senzing-tools serve-grpc \
83
- --database-url postgresql://username:[email protected] :5432/G2 \
84
- --enable-all
85
-
86
- ```
87
-
88
- 1. Run `senzing-tools serve-grpc --help` or see [Parameters](#parameters) for additional parameters.
89
-
90
- ### Using environment variables
91
-
92
- 1. :pencil2: Specify database using environment variable.
93
- Example:
94
-
95
- ```console
96
- export LD_LIBRARY_PATH=/opt/senzing/er/lib/
97
- export SENZING_TOOLS_DATABASE_URL=postgresql://username:[email protected] :5432/G2
98
- export SENZING_TOOLS_ENABLE_ALL=true
99
- senzing-tools serve-grpc
100
- ```
101
-
102
- 1. Run `senzing-tools serve-grpc --help` or see [Parameters](#parameters) for additional parameters.
103
-
104
- ### Using Docker
105
-
106
- This usage shows how to initialze a database with a Docker container.
107
-
108
- 1. This usage specifies a URL of an external database.
109
- Example:
110
-
111
- ```console
112
- docker run \
113
- --env SENZING_TOOLS_DATABASE_URL=postgresql://username:[email protected] :5432/G2 \
114
- --env SENZING_TOOLS_ENABLE_ALL=true \
115
- --interactive \
116
- --publish 8258:8258 \
117
- --rm \
118
- --tty \
119
- senzing/senzing-tools serve-grpc
120
-
48
+ docker run -it --name senzing-serve-grpc -p 8261:8261 --rm senzing/serve-grpc
121
49
```
122
50
123
51
1. See [Parameters](#parameters) for additional parameters.
@@ -126,11 +54,6 @@ This usage shows how to initialze a database with a Docker container.
126
54
127
55
- **[SENZING_TOOLS_DATABASE_URL]**
128
56
- **[SENZING_TOOLS_ENABLE_ALL]**
129
- - **[SENZING_TOOLS_ENABLE_G2CONFIG]**
130
- - **[SENZING_TOOLS_ENABLE_G2CONFIGMGR]**
131
- - **[SENZING_TOOLS_ENABLE_G2DIAGNOSTIC]**
132
- - **[SENZING_TOOLS_ENABLE_G2ENGINE]**
133
- - **[SENZING_TOOLS_ENABLE_G2PRODUCT]**
134
57
- **[SENZING_TOOLS_ENGINE_CONFIGURATION_JSON]**
135
58
- **[SENZING_TOOLS_ENGINE_LOG_LEVEL]**
136
59
- **[SENZING_TOOLS_ENGINE_MODULE_NAME]**
@@ -159,7 +82,6 @@ This usage shows how to initialze a database with a Docker container.
159
82
[go-test-windows.yaml]: https://github.com/senzing-garage/serve-grpc/actions/workflows/go-test-windows.yaml
160
83
[golangci-lint.yaml Badge]: https://github.com/senzing-garage/serve-grpc/actions/workflows/golangci-lint.yaml/badge.svg
161
84
[golangci-lint.yaml]: https://github.com/senzing-garage/serve-grpc/actions/workflows/golangci-lint.yaml
162
- [gRPC]: https://github.com/senzing-garage/knowledge-base/blob/main/WHATIS/grpc.md
163
85
[License Badge]: https://img.shields.io/badge/License-Apache2-brightgreen.svg
164
86
[License]: https://github.com/senzing-garage/serve-grpc/blob/main/LICENSE
165
87
[Package reference]: https://pkg.go.dev/github.com/senzing-garage/serve-grpc
@@ -168,17 +90,11 @@ This usage shows how to initialze a database with a Docker container.
168
90
[Senzing Quick Start guides]: https://docs.senzing.com/quickstart/
169
91
[SENZING_TOOLS_DATABASE_URL]: https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_database_url
170
92
[SENZING_TOOLS_ENABLE_ALL]: https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_enable_all
171
- [SENZING_TOOLS_ENABLE_G2CONFIG]: https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_enable_g2config
172
- [SENZING_TOOLS_ENABLE_G2CONFIGMGR]: https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_enable_g2configmgr
173
- [SENZING_TOOLS_ENABLE_G2DIAGNOSTIC]: https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_enable_g2diagnostic
174
- [SENZING_TOOLS_ENABLE_G2ENGINE]: https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_enable_g2engine
175
- [SENZING_TOOLS_ENABLE_G2PRODUCT]: https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_enable_g2product
176
93
[SENZING_TOOLS_ENGINE_CONFIGURATION_JSON]: https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_engine_configuration_json
177
94
[SENZING_TOOLS_ENGINE_LOG_LEVEL]: https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_engine_log_level
178
95
[SENZING_TOOLS_ENGINE_MODULE_NAME]: https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_engine_module_name
179
96
[SENZING_TOOLS_GRPC_PORT]: https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_grpc_port
180
97
[SENZING_TOOLS_LOG_LEVEL]: https://github.com/senzing-garage/knowledge-base/blob/main/lists/environment-variables.md#senzing_tools_log_level
181
- [senzing-tools]: https://github.com/senzing-garage/senzing-tools
182
98
[Senzing]: https://senzing.com/
183
99
[senzing/sz-sdk-go-core]: https://github.com/senzing-garage/sz-sdk-go-core
184
100
[sz-sdk-go-grpc]: https://github.com/senzing-garage/sz-sdk-go-grpc
0 commit comments