-
Notifications
You must be signed in to change notification settings - Fork 0
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
Move to memory db #5
base: master
Are you sure you want to change the base?
Changes from 5 commits
63c7efc
1e0526b
393aac4
fc3b176
81ceed7
49ef231
f251897
1023525
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ package main | |
import ( | ||
"context" | ||
"flag" | ||
"github.com/Capstone-auto-grader/grader-api-v2/internal/docker-client" | ||
sync_map "github.com/Capstone-auto-grader/grader-api-v2/internal/sync-map" | ||
"log" | ||
"net/http" | ||
"strings" | ||
|
@@ -54,7 +56,7 @@ func serve() error { | |
log.Fatalln(errors.Wrap(err, failedCertCreation)) | ||
} | ||
grpcServer := grpc.NewServer(grpc.Creds(serverCert)) | ||
graderService := graderd.NewGraderService(graderd.NewDockerClient(*dockerAddr, *dockerVersion), graderd.NewPGDatabase(*databaseAddr), *webAddr) | ||
graderService := graderd.NewGraderService(docker_client.NewDockerClient(*dockerAddr, *dockerVersion, sync_map.NewSyncMap(), 2), *webAddr) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure about creating and passing the |
||
pb.RegisterGraderServer(grpcServer, graderService) | ||
|
||
endpoint := *grpcAddr + *grpcPort | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should use single word names: https://golang.org/doc/effective_go.html#package-names