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

Adding cofide-sdk demo example #3

Closed
wants to merge 6 commits into from
Closed

Conversation

jsnctl
Copy link
Contributor

@jsnctl jsnctl commented Oct 21, 2024

  • Adds a client-server workload pair using the cofide-sdk-go slot in replacement for Go's HTTP server, cofide_http
  • Refactors project to use a single go.mod
  • Refactors Justfile to build into /bin and copy binaries to Docker images (required due to local import of ../cofide-sdk-go)

@jsnctl jsnctl self-assigned this Oct 21, 2024
@jsnctl jsnctl marked this pull request as ready for review October 21, 2024 16:09
@jsnctl jsnctl requested a review from mattbates October 23, 2024 08:44
@jsnctl jsnctl requested a review from mattbates October 23, 2024 09:03
docker build -f ./workloads/ping-pong/client/Dockerfile.client -t cofide-demo-ping-pong-client .

build-cofide-sdk:
CGO_ENABLED=0 go build -o bin/cofide-sdk/server ./workloads/cofide-sdk/server/main.go
Copy link
Contributor

@mattbates mattbates Oct 24, 2024

Choose a reason for hiding this comment

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

Would be great if we could use ko for builds of Go applications. It's super convenient to use and builds lean container images. I use it locally but I'd recommend we use it more widely.

Copy link
Contributor

Choose a reason for hiding this comment

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

Added in #5

Comment on lines +1 to +3
build:
just build-ping-pong
just build-cofide-sdk
Copy link
Contributor

Choose a reason for hiding this comment

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

Use Just dependencies?

Suggested change
build:
just build-ping-pong
just build-cofide-sdk
build: build-ping-pong build-cofide-sdk

Copy link
Contributor

Choose a reason for hiding this comment

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

Added in #5

ctx, cancel := context.WithTimeout(ctx, 30*time.Second)
defer cancel()

client := cofide_http.NewClient(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use WithSVIDMatch on the client to match the server's SVID?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also added in #5

@mattbates
Copy link
Contributor

mattbates commented Nov 2, 2024

I've addressed Mark's feedback and added some additional capability in #5. The PR builds on this one so I think we can probably safe close this.

@jsnctl jsnctl closed this Nov 5, 2024
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.

3 participants