Skip to content

Commit

Permalink
#62 Change servegrpc to serve-grpc (#63)
Browse files Browse the repository at this point in the history
* #62 Change servegrpc to serve-grpc

* #62 Savepoint

* #62 Savepoint
  • Loading branch information
docktermj authored Mar 29, 2023
1 parent 6a116c6 commit 5118f6c
Show file tree
Hide file tree
Showing 23 changed files with 218 additions and 201 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-proxy-pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- name: Pull new module version
uses: andrewslotin/go-proxy-pull-action@v1.1.0
with:
import_path: github.com/senzing/servegrpc
import_path: github.com/senzing/serve-grpc
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

-

## [0.4.0] - 2023-03-27

### Added in 0.4.0

- Repository name change from `servegrpc` to `serve-grpc`

## [0.3.9] - 2023-03-27

### Added in 0.3.9
Expand All @@ -19,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- g2engineserver.StreamExportCSVEntityReport()
- g2engineserver.StreamExportJSONEntityReport()
- Update dependencies
- Last versioned release before name change to serve-grpc

## [0.3.8] - 2023-03-14

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ The variables are used throughout the installation procedure.

```console
export GIT_ACCOUNT=senzing
export GIT_REPOSITORY=servegrpc
export GIT_REPOSITORY=serve-grpc
```

Synthesize environment variables.
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARG IMAGE_FINAL=senzing/senzingapi-runtime:3.4.2

FROM ${IMAGE_GO_BUILDER} as go_builder
ENV REFRESHED_AT 2023-03-08
LABEL Name="senzing/servegrpc-builder" \
LABEL Name="senzing/serve-grpc-builder" \
Maintainer="support@senzing.com" \
Version="0.3.6"

Expand Down Expand Up @@ -55,7 +55,7 @@ RUN mkdir -p /output \

FROM ${IMAGE_FINAL} as final
ENV REFRESHED_AT 2023-03-08
LABEL Name="senzing/servegrpc" \
LABEL Name="senzing/serve-grpc" \
Maintainer="support@senzing.com" \
Version="0.3.6"

Expand All @@ -66,7 +66,7 @@ COPY ./testdata/sqlite/G2C.db /tmp/sqlite/G2C.db

# Copy files from prior step.

COPY --from=go_builder "/output/linux/servegrpc" "/app/servegrpc"
COPY --from=go_builder "/output/linux/serve-grpc" "/app/serve-grpc"

# Runtime environment variables.

Expand All @@ -76,4 +76,4 @@ ENV SENZING_TOOLS_DATABASE_URL=sqlite3://na:na@/tmp/sqlite/G2C.db
# Runtime execution.

WORKDIR /app
ENTRYPOINT ["/app/servegrpc"]
ENTRYPOINT ["/app/serve-grpc"]
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Makefile that builds servegrpc, a "go" program.
# Makefile that builds serve-grpc, a "go" program.

# "Simple expanded" variables (':=')

Expand Down Expand Up @@ -57,8 +57,8 @@ build-linux:
GOARCH=amd64 \
go build \
-ldflags \
"-X 'github.com/senzing/servegrpc/cmd.buildVersion=${BUILD_VERSION}' \
-X 'github.com/senzing/servegrpc/cmd.buildIteration=${BUILD_ITERATION}' \
"-X 'github.com/senzing/serve-grpc/cmd.buildVersion=${BUILD_VERSION}' \
-X 'github.com/senzing/serve-grpc/cmd.buildIteration=${BUILD_ITERATION}' \
" \
-o $(GO_PACKAGE_NAME)
@mkdir -p $(TARGET_DIRECTORY)/linux || true
Expand Down Expand Up @@ -138,13 +138,13 @@ docker-run:
$(DOCKER_IMAGE_NAME)


.PHONY: run-servegrpc
run-servegrpc: build
@target/linux/servegrpc
.PHONY: run-serve-grpc
run-serve-grpc: build
@target/linux/serve-grpc

.PHONY: run-servegrpc-trace
run-servegrpc-trace: build
@target/linux/servegrpc --log-level TRACE --engine-log-level 1
.PHONY: run-serve-grpc-trace
run-serve-grpc-trace: build
@target/linux/serve-grpc --log-level TRACE --engine-log-level 1

# -----------------------------------------------------------------------------
# Utility targets
Expand Down
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
# servegrpc
# serve-grpc

## :warning: WARNING: servegrpc is still in development :warning: _
## :warning: WARNING: serve-grpc is still in development :warning: _

At the moment, this is "work-in-progress" with Semantic Versions of `0.n.x`.
Although it can be reviewed and commented on,
the recommendation is not to use it yet.

## Synopsis

`servegrpc` is a command in the
`serve-grpc` is a command in the
[senzing-tools](https://github.com/Senzing/senzing-tools)
suite of tools.
This command is a
[gRPC](https://grpc.io/)
server application that supports requests to the Senzing SDK via network access.

[![Go Reference](https://pkg.go.dev/badge/github.com/senzing/servegrpc.svg)](https://pkg.go.dev/github.com/senzing/servegrpc)
[![Go Report Card](https://goreportcard.com/badge/github.com/senzing/servegrpc)](https://goreportcard.com/report/github.com/senzing/servegrpc)
[![Go Reference](https://pkg.go.dev/badge/github.com/senzing/serve-grpc.svg)](https://pkg.go.dev/github.com/senzing/serve-grpc)
[![Go Report Card](https://goreportcard.com/badge/github.com/senzing/serve-grpc)](https://goreportcard.com/report/github.com/senzing/serve-grpc)
[![go-test.yaml](https://github.com/Senzing/serve-grpc/actions/workflows/go-test.yaml/badge.svg)](https://github.com/Senzing/serve-grpc/actions/workflows/go-test.yaml)

## Overview

`servegrpc` supports the
`serve-grpc` supports the
[Senzing Protocol Buffer definitions](https://github.com/Senzing/g2-sdk-proto).
Under the covers, the gRPC request is translated by the gRPC server into a Senzing Go SDK API call using
[senzing/g2-sdk-go-base](https://github.com/Senzing/g2-sdk-go-base).
Expand All @@ -33,7 +34,7 @@ Senzing SDKs for accessing the gRPC server:

## Install

1. The `servegrpc` command is installed with the
1. The `serve-grpc` command is installed with the
[senzing-tools](https://github.com/Senzing/senzing-tools)
suite of tools.
See senzing-tools [install](https://github.com/Senzing/senzing-tools#install).
Expand All @@ -42,16 +43,16 @@ Senzing SDKs for accessing the gRPC server:

```console
export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
senzing-tools servegrpc [flags]
senzing-tools serve-grpc [flags]
```

1. For options and flags:
1. [Online documentation](https://hub.senzing.com/senzing-tools/senzing-tools_servegrpc.html)
1. [Online documentation](https://hub.senzing.com/senzing-tools/senzing-tools_serve-grpc.html)
1. Runtime documentation:

```console
export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
senzing-tools servegrpc --help
senzing-tools serve-grpc --help
```

1. In addition to the following simple usage examples, there are additional [Examples](docs/examples.md).
Expand All @@ -63,7 +64,7 @@ senzing-tools servegrpc [flags]

```console
export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
senzing-tools servegrpc --database-url postgresql://username:password@postgres.example.com:5432/G2
senzing-tools serve-grpc --database-url postgresql://username:password@postgres.example.com:5432/G2
```

1. See [Parameters](#parameters) for additional parameters.
Expand All @@ -76,7 +77,7 @@ senzing-tools servegrpc [flags]
```console
export SENZING_TOOLS_DATABASE_URL=postgresql://username:password@postgres.example.com:5432/G2
export LD_LIBRARY_PATH=/opt/senzing/g2/lib/
senzing-tools servegrpc
senzing-tools serve-grpc
```

1. See [Parameters](#parameters) for additional parameters.
Expand All @@ -95,7 +96,7 @@ This usage shows how to initialze a database with a Docker container.
--publish 8258:8258 \
--rm \
--tty \
senzing/senzing-tools servegrpc
senzing/senzing-tools serve-grpc

```

Expand All @@ -117,7 +118,7 @@ This usage shows how to initialze a database with a Docker container.

## References

- [Command reference](https://hub.senzing.com/senzing-tools/senzing-tools_servegrpc.html)
- [Command reference](https://hub.senzing.com/senzing-tools/senzing-tools_serve-grpc.html)
- [Development](docs/development.md)
- [Errors](docs/errors.md)
- [Examples](docs/examples.md)
4 changes: 2 additions & 2 deletions cmd/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ var completionCmd = &cobra.Command{
Use: "completion",
Short: "Generate bash completion for the command",
Long: `To load completions, run:
source < (servegrpc completion)
source < (serve-grpc completion)
To load completions automaticallon on login, add this line to your .bashrc file:
source < (servegrpc completion)
source < (serve-grpc completion)
`,
RunE: func(cmd *cobra.Command, args []string) error {
return completionAction(os.Stdout)
Expand Down
2 changes: 1 addition & 1 deletion cmd/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var docsCmd = &cobra.Command{
return err
}
if dir == "" {
if dir, err = os.MkdirTemp("", "servegrpc"); err != nil {
if dir, err = os.MkdirTemp("", "serve-grpc"); err != nil {
return err
}
}
Expand Down
10 changes: 5 additions & 5 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/senzing/senzing-tools/envar"
"github.com/senzing/senzing-tools/helper"
"github.com/senzing/senzing-tools/option"
"github.com/senzing/servegrpc/grpcserver"
"github.com/senzing/serve-grpc/grpcserver"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand All @@ -37,7 +37,7 @@ const (
var (
buildIteration string = "0"
buildVersion string = "0.3.7"
defaultEngineModuleName string = fmt.Sprintf("servegrpc-%d", time.Now().Unix())
defaultEngineModuleName string = fmt.Sprintf("serve-grpc-%d", time.Now().Unix())
)

// If a configuration file is present, load it.
Expand All @@ -54,7 +54,7 @@ func loadConfigurationFile(cobraCommand *cobra.Command) {

// Specify configuration file name.

viper.SetConfigName("servegrpc")
viper.SetConfigName("serve-grpc")
viper.SetConfigType("yaml")

// Define search path order.
Expand Down Expand Up @@ -120,11 +120,11 @@ func loadOptions(cobraCommand *cobra.Command) {

// RootCmd represents the command.
var RootCmd = &cobra.Command{
Use: "servegrpc",
Use: "serve-grpc",
Short: "Start a gRPC server for the Senzing SDK API",
Long: `
Start a gRPC server for the Senzing SDK API.
For more information, visit https://github.com/Senzing/servegrpc
For more information, visit https://github.com/Senzing/serve-grpc
`,
PreRun: func(cobraCommand *cobra.Command, args []string) {
loadConfigurationFile(cobraCommand)
Expand Down
8 changes: 4 additions & 4 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ One or two paragraph overview of this module...
(This page describes the nature of the entire Go module or the top-level command, not an individual package.)
More information at https://github.com/senzing/servegrpc
More information at https://github.com/senzing/serve-grpc
# Example Package
Expand All @@ -16,7 +16,7 @@ documentation, tests, and examples should be done. This paragraph (or two)
should provide a brief overview while linking the reader to the documentation
included in the package itself.
More information can be found in the [pkg/github.com/senzing/servegrpc/examplepackage] documentation.
More information can be found in the [pkg/github.com/senzing/serve-grpc/examplepackage] documentation.
# Another Header: Package or other module features...
Expand All @@ -33,8 +33,8 @@ Examples of use can be seen in the main_test.go files.
import (
fmt
"github.com/senzing/servegrpc/examplepackage"
"github.com/senzing/servegrpc/anotherpackage"
"github.com/senzing/serve-grpc/examplepackage"
"github.com/senzing/serve-grpc/anotherpackage"
)
func main() {
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# servegrpc
# serve-grpc

## Commands

1. [senzing-tools servegrpc](https://hub.senzing.com/senzing-tools/senzing-tools_servegrpc.html)
1. [senzing-tools serve-grpc](https://hub.senzing.com/senzing-tools/senzing-tools_serve-grpc.html)

## Examples

Expand Down
Loading

0 comments on commit 5118f6c

Please sign in to comment.