Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: dummy sync server #53

Merged
merged 12 commits into from
Sep 1, 2023
Merged

feat: dummy sync server #53

merged 12 commits into from
Sep 1, 2023

Conversation

toddbaert
Copy link
Member

@toddbaert toddbaert commented Aug 30, 2023

Stub for mocking a sync server.

You can test it easily like this:

go run main.go -f ../flags1.json -f ../flags2.json

then:

grpcurl -import-path '/home/{user}/Downloads' -proto sync.proto -plaintext localhost:9090 sync.v1.FlagSyncService/FetchAllFlags

(assuming you have sync.proto in your downloads)

You can also do sync.v1.FlagSyncService/SyncFlags which will open a stream that sends the merged payload anytime you change one of the files.

Signed-off-by: Todd Baert <[email protected]>
@toddbaert toddbaert marked this pull request as draft August 30, 2023 19:54
Signed-off-by: Todd Baert <[email protected]>
@toddbaert toddbaert requested a review from mowies August 30, 2023 20:10
toddbaert and others added 2 commits August 31, 2023 13:30
Co-authored-by: Kavindu Dodanduwa <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
@toddbaert toddbaert force-pushed the feat/grpc-sync-stub branch from 064b6dc to 6dd7ad1 Compare August 31, 2023 17:31
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
@toddbaert toddbaert marked this pull request as ready for review August 31, 2023 17:40
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
Signed-off-by: Todd Baert <[email protected]>
sync/Dockerfile Outdated
@@ -0,0 +1,8 @@
FROM busybox:1.36

COPY sync/bin/* .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I prefer a standalone docker file. here this depends on the MakeFile 🤔

Can we first build the binary and then extract that from a staged docker build ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya good call. I'll make that change

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done this: 841449b

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the go building from the ci.

@Kavindu-Dodan
Copy link
Contributor

Overal looks good 👍

Signed-off-by: Todd Baert <[email protected]>
@toddbaert toddbaert merged commit 649c770 into main Sep 1, 2023
3 checks passed
@toddbaert toddbaert deleted the feat/grpc-sync-stub branch September 1, 2023 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants