Skip to content

Commit

Permalink
263.dockter.2 (#276)
Browse files Browse the repository at this point in the history
* #263 Savepoint

* #263 Update dependencies

* #263 Working testcases

* #263 Prepare for versioned release

* #263 Prepare for versioned release

* #263 Fix typo

* #263 Only build on amd64
  • Loading branch information
docktermj authored May 9, 2024
1 parent 28e411e commit 741b744
Show file tree
Hide file tree
Showing 15 changed files with 226 additions and 82 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-build-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- name: Build docker image
uses: senzing-factory/github-action-docker-buildx-build@v1
with:
platforms: linux/amd64
image-repository: senzing/${{ steps.repo-basename.outputs.repo }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
2 changes: 1 addition & 1 deletion .github/workflows/docker-push-containers-to-dockerhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
image-repository: senzing/${{ steps.repo-basename.outputs.repo }}
image-tag: ${{ github.ref_name }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
platforms: "linux/amd64,linux/arm64"
platforms: "linux/amd64"
username: ${{ secrets.DOCKERHUB_USERNAME }}
File renamed without changes.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

-

## [0.7.2] - 2024-05-08

### Added in 0.7.2

- `SzDiagnostic.GetFeature`
- `SzEngine.FindInterestingEntitiesByEntityId`
- `SzEngine.FindInterestingEntitiesByRecordId`
- `SzEngine.ProcessRedoRecord`

### Changed in 0.7.2

- Update `Dockerfile`

### Deleted in 0.7.2

- `SzEngine.GetRepositoryLastModifiedTime`

## [0.7.1] - 2024-04-26

### Changed in 0.7.1
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Stages
# -----------------------------------------------------------------------------

ARG IMAGE_GO_BUILDER=golang:1.22.1-bullseye@sha256:dcff0d950cb4648fec14ee51baa76bf27db3bb1e70a49f75421a8828db7b9910
ARG IMAGE_FINAL=senzing/senzingapi-runtime:3.9.0
ARG IMAGE_GO_BUILDER=golang:1.22.3-bullseye@sha256:e72f9a1d29fbd6e1603df5a780e8f407caebef4dbb9f07536fc72f1c368298aa
ARG IMAGE_FINAL=senzing/senzingapi-runtime-staging:latest

# -----------------------------------------------------------------------------
# Stage: senzingapi_runtime
Expand Down
6 changes: 3 additions & 3 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
1. Identify git repository.

```console
export GIT_ACCOUNT=senzing
export GIT_ACCOUNT=senzing-garage
export GIT_REPOSITORY=serve-grpc
export GIT_ACCOUNT_DIR=~/${GIT_ACCOUNT}.git
export GIT_REPOSITORY_DIR="${GIT_ACCOUNT_DIR}/${GIT_REPOSITORY}"
Expand Down Expand Up @@ -58,7 +58,7 @@ Since the Senzing library is a prerequisite, it must be installed first.

```console
cd ${GIT_REPOSITORY_DIR}
make clean new-sqlite test
make clean setup test

```

Expand All @@ -82,7 +82,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
### Test using Docker-compose stack with PostgreSql database

The following instructions show how to bring up a test stack to be used
in testing the `g2-sdk-go-base` packages.
in testing the `sz-sdk-go-core` packages.

1. Identify a directory to place docker-compose artifacts.
The directory specified will be deleted and re-created.
Expand Down
20 changes: 10 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ require (
github.com/senzing-garage/go-helpers v0.5.1
github.com/senzing-garage/go-logging v1.4.1
github.com/senzing-garage/go-observing v0.3.1
github.com/senzing-garage/sz-sdk-go v0.12.1
github.com/senzing-garage/sz-sdk-go-core v0.7.0
github.com/senzing-garage/sz-sdk-proto v0.7.2
github.com/senzing-garage/sz-sdk-go v0.12.3
github.com/senzing-garage/sz-sdk-go-core v0.7.1
github.com/senzing-garage/sz-sdk-proto v0.7.5
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.9.0
Expand All @@ -25,7 +25,7 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.1 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
Expand All @@ -37,12 +37,12 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be // indirect
google.golang.org/protobuf v1.33.0 // indirect
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
40 changes: 20 additions & 20 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0V
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/pelletier/go-toml/v2 v2.2.1 h1:9TA9+T8+8CUCO2+WYnDLCgrYi9+omqKXyjDtosvtEhg=
github.com/pelletier/go-toml/v2 v2.2.1/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand All @@ -50,12 +50,12 @@ github.com/senzing-garage/go-messaging v1.4.1 h1:ZdFcemh1iACP+HJWGS5/QLaUSD7PUYV
github.com/senzing-garage/go-messaging v1.4.1/go.mod h1:7tEicOa0baYz0lh0w1BJEiQ6ry1FIQl/67JAWwFpcRY=
github.com/senzing-garage/go-observing v0.3.1 h1:EGqe+Uix8VNQ9HCwm5xZkAF0hGoHaC1URAaT/5FW37A=
github.com/senzing-garage/go-observing v0.3.1/go.mod h1:x60vlRIR0ZdJrHDuK82nzmQG4sN0G6oqdLE9vQl9pVc=
github.com/senzing-garage/sz-sdk-go v0.12.1 h1:W+4rotdlN6O/eGWNITrCz+LZ30YQ9Pog1Id0XtWPo9c=
github.com/senzing-garage/sz-sdk-go v0.12.1/go.mod h1:K+tiyY6W5FnUrzBZXIg5x7cWbZKpO/6rzpkCoKhcK6o=
github.com/senzing-garage/sz-sdk-go-core v0.7.0 h1:D3uFeft3dfY56uhvl1H8voCCsnz5ThCFS6hp5CV/Pek=
github.com/senzing-garage/sz-sdk-go-core v0.7.0/go.mod h1:8KW1F3s01J0wX0gRTZAykAYXkhfwRWOoNWQPWBbms4c=
github.com/senzing-garage/sz-sdk-proto v0.7.2 h1:CLtju4121o1S91JDsomgWiiBTJTZtYlKHMawqrQEL1o=
github.com/senzing-garage/sz-sdk-proto v0.7.2/go.mod h1:sthSvS7iFKjC2r6l/hXYNhH0WceRaK2dFDWRFWHhRt4=
github.com/senzing-garage/sz-sdk-go v0.12.3 h1:KDOByEcJ5oTMogR9BKx7UWfEiy2/lswSQqykRmdyJt8=
github.com/senzing-garage/sz-sdk-go v0.12.3/go.mod h1:K+tiyY6W5FnUrzBZXIg5x7cWbZKpO/6rzpkCoKhcK6o=
github.com/senzing-garage/sz-sdk-go-core v0.7.1 h1:J1qAXrMxhYIStEdc7r4+RnPR9W13x/9h5HRYn7OwQO4=
github.com/senzing-garage/sz-sdk-go-core v0.7.1/go.mod h1:+WbyXc3vgmGaYO5tbHSFAxfTfiart5g/ljR+I0g8b7s=
github.com/senzing-garage/sz-sdk-proto v0.7.5 h1:XDEVh9gsB1DRSE/O/bb9fYIoror3K8NNNbTzDHaFvPo=
github.com/senzing-garage/sz-sdk-proto v0.7.5/go.mod h1:Volu1U+jmQZKA3XkcyRgj9VpKVLmsdjhVBGSwWS+bvs=
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
Expand All @@ -81,20 +81,20 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY=
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be h1:LG9vZxsWGOmUKieR8wPAUR3u3MpnYFQZROPIMaXh7/A=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM=
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae h1:c55+MER4zkBS14uJhSZMGGmya0yJx5iHV4x/fpOSNRk=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM=
google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM=
google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
Expand Down
3 changes: 2 additions & 1 deletion makefiles/linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ test-osarch-specific:
only-linux:
@echo "Only linux has this Makefile target."

.PHONY: run-serve-grpc

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

Expand Down
16 changes: 16 additions & 0 deletions szdiagnosticserver/szdiagnosticserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,22 @@ func (server *SzDiagnosticServer) GetDatastoreInfo(ctx context.Context, request
return &response, err
}

func (server *SzDiagnosticServer) GetFeature(ctx context.Context, request *szpb.GetFeatureRequest) (*szpb.GetFeatureResponse, error) {
var err error = nil
var result string
if server.isTrace {
entryTime := time.Now()
server.traceEntry(1, request)
defer func() { server.traceExit(2, request, result, err, time.Since(entryTime)) }()
}
szDiagnostic := getSzDiagnostic()
result, err = szDiagnostic.GetFeature(ctx, int64(request.GetFeatureId()))
response := szpb.GetFeatureResponse{
Result: result,
}
return &response, err
}

func (server *SzDiagnosticServer) PurgeRepository(ctx context.Context, request *szpb.PurgeRepositoryRequest) (*szpb.PurgeRepositoryResponse, error) {
var err error = nil
if server.isTrace {
Expand Down
17 changes: 17 additions & 0 deletions szdiagnosticserver/szdiagnosticserver_examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,23 @@ func ExampleSzDiagnosticServer_GetDatastoreInfo() {
// Output: {"dataStores":[{"id":"CORE", "type":"sqlite3","location":"/tmp/sqlite/G2C.db"}]}
}

func ExampleSzDiagnosticServer_GetFeature() {
// For more information, visit https://github.com/senzing-garage/serve-grpc/blob/main/szdiagnosticserver/szdiagnosticserver_examples_test.go
ctx := context.TODO()
szDiagnosticServer := getSzDiagnosticServer(ctx)
request := &szpb.GetFeatureRequest{
FeatureId: int64(1),
}
response, err := szDiagnosticServer.GetFeature(ctx, request)
if err != nil {
fmt.Println(err)
}
// fmt.Println(truncate(response.GetResult(), 25))
fmt.Println(response.GetResult())

// Output: {"LIB_FEAT_ID":1,"FTYPE_CODE":"NAME","ELEMENTS":[{"FELEM_CODE":"TOKENIZED_NM","FELEM_VALUE":"ROBERT|SMITH"},{"FELEM_CODE":"CATEGORY","FELEM_VALUE":"PERSON"},{"FELEM_CODE":"CULTURE","FELEM_VALUE":"ANGLO"},{"FELEM_CODE":"GIVEN_NAME","FELEM_VALUE":"Robert"},{"FELEM_CODE":"SUR_NAME","FELEM_VALUE":"Smith"},{"FELEM_CODE":"FULL_NAME","FELEM_VALUE":"Robert Smith"}]}
}

func ExampleSzDiagnosticServer_PurgeRepository() {
// For more information, visit https://github.com/senzing-garage/serve-grpc/blob/main/szdiagnosticserver/szdiagnosticserver_test.go
ctx := context.TODO()
Expand Down
17 changes: 14 additions & 3 deletions szdiagnosticserver/szdiagnosticserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,26 @@ func TestSzDiagnosticServer_GetDatastoreInfo(test *testing.T) {
printActual(test, response)
}

func TestSzDiagnosticServer_PurgeRepository(test *testing.T) {
func TestSzDiagnosticServer_GetFeature(test *testing.T) {
ctx := context.TODO()
szDiagnosticServer := getTestObject(ctx, test)
request := &szpb.PurgeRepositoryRequest{}
response, err := szDiagnosticServer.PurgeRepository(ctx, request)
request := &szpb.GetFeatureRequest{
FeatureId: int64(1),
}
response, err := szDiagnosticServer.GetFeature(ctx, request)
testError(test, err)
printActual(test, response)
}

// func TestSzDiagnosticServer_PurgeRepository(test *testing.T) {
// ctx := context.TODO()
// szDiagnosticServer := getTestObject(ctx, test)
// request := &szpb.PurgeRepositoryRequest{}
// response, err := szDiagnosticServer.PurgeRepository(ctx, request)
// testError(test, err)
// printActual(test, response)
// }

func TestSzDiagnosticServer_Reinitialize(test *testing.T) {
ctx := context.TODO()
szDiagnostic := getTestObject(ctx, test)
Expand Down
68 changes: 50 additions & 18 deletions szengineserver/szengineserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (server *SzEngineServer) CloseExport(ctx context.Context, request *szpb.Clo
defer func() { server.traceExit(14, request, err, time.Since(entryTime)) }()
}
szEngine := getSzEngine()
err = szEngine.CloseExport(ctx, uintptr(request.GetResponseHandle()))
err = szEngine.CloseExport(ctx, uintptr(request.GetExportHandle()))
response := szpb.CloseExportResponse{}
return &response, err
}
Expand Down Expand Up @@ -122,13 +122,45 @@ func (server *SzEngineServer) FetchNext(ctx context.Context, request *szpb.Fetch
defer func() { server.traceExit(32, request, result, err, time.Since(entryTime)) }()
}
szEngine := getSzEngine()
result, err = szEngine.FetchNext(ctx, uintptr(request.GetResponseHandle()))
result, err = szEngine.FetchNext(ctx, uintptr(request.GetExportHandle()))
response := szpb.FetchNextResponse{
Result: result,
}
return &response, err
}

func (server *SzEngineServer) FindInterestingEntitiesByEntityId(ctx context.Context, request *szpb.FindInterestingEntitiesByEntityIdRequest) (*szpb.FindInterestingEntitiesByEntityIdResponse, error) {
var err error = nil
var result string
if server.isTrace {
entryTime := time.Now()
server.traceEntry(33, request)
defer func() { server.traceExit(34, request, result, err, time.Since(entryTime)) }()
}
szEngine := getSzEngine()
result, err = szEngine.FindInterestingEntitiesByEntityId(ctx, request.GetEntityId(), request.GetFlags())
response := szpb.FindInterestingEntitiesByEntityIdResponse{
Result: result,
}
return &response, err
}

func (server *SzEngineServer) FindInterestingEntitiesByRecordId(ctx context.Context, request *szpb.FindInterestingEntitiesByRecordIdRequest) (*szpb.FindInterestingEntitiesByRecordIdResponse, error) {
var err error = nil
var result string
if server.isTrace {
entryTime := time.Now()
server.traceEntry(35, request)
defer func() { server.traceExit(36, request, result, err, time.Since(entryTime)) }()
}
szEngine := getSzEngine()
result, err = szEngine.FindInterestingEntitiesByRecordId(ctx, request.GetDataSourceCode(), request.GetRecordId(), request.GetFlags())
response := szpb.FindInterestingEntitiesByRecordIdResponse{
Result: result,
}
return &response, err
}

func (server *SzEngineServer) FindNetworkByEntityId(ctx context.Context, request *szpb.FindNetworkByEntityIdRequest) (*szpb.FindNetworkByEntityIdResponse, error) {
var err error = nil
var result string
Expand Down Expand Up @@ -273,22 +305,6 @@ func (server *SzEngineServer) GetRedoRecord(ctx context.Context, request *szpb.G
return &response, err
}

func (server *SzEngineServer) GetRepositoryLastModifiedTime(ctx context.Context, request *szpb.GetRepositoryLastModifiedTimeRequest) (*szpb.GetRepositoryLastModifiedTimeResponse, error) {
var err error = nil
var result int64
if server.isTrace {
entryTime := time.Now()
server.traceEntry(89, request)
defer func() { server.traceExit(90, request, result, err, time.Since(entryTime)) }()
}
szEngine := getSzEngine()
result, err = szEngine.GetRepositoryLastModifiedTime(ctx)
response := szpb.GetRepositoryLastModifiedTimeResponse{
Result: result,
}
return &response, err
}

func (server *SzEngineServer) GetStats(ctx context.Context, request *szpb.GetStatsRequest) (*szpb.GetStatsResponse, error) {
var err error = nil
var result string
Expand Down Expand Up @@ -350,6 +366,22 @@ func (server *SzEngineServer) PrimeEngine(ctx context.Context, request *szpb.Pri
return &response, err
}

func (server *SzEngineServer) ProcessRedoRecord(ctx context.Context, request *szpb.ProcessRedoRecordRequest) (*szpb.ProcessRedoRecordResponse, error) {
// TODO: Fix trace IDs.
var err error = nil
if server.isTrace {
entryTime := time.Now()
server.traceEntry(999, request)
defer func() { server.traceExit(999, request, err, time.Since(entryTime)) }()
}
szEngine := getSzEngine()
result, err := szEngine.ProcessRedoRecord(ctx, request.GetRedoRecord(), request.GetFlags())
response := szpb.ProcessRedoRecordResponse{
Result: result,
}
return &response, err
}

func (server *SzEngineServer) ReevaluateEntity(ctx context.Context, request *szpb.ReevaluateEntityRequest) (*szpb.ReevaluateEntityResponse, error) {
var err error = nil
var result string
Expand Down
Loading

0 comments on commit 741b744

Please sign in to comment.