-
Notifications
You must be signed in to change notification settings - Fork 62
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
Create cluster #104
Create cluster #104
Conversation
Pull Request Test Coverage Report for Build 1768114197
💛 - Coveralls |
controller/server/main.go
Outdated
|
||
func (s *server) DeleteTopology(ctx context.Context, req *cpb.DeleteTopologyRequest) (*cpb.DeleteTopologyResponse, error) { | ||
return nil, status.Errorf(codes.Unimplemented, "DeleteTopology RPC method not implemented.") | ||
} |
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.
You don't actually need any of these methods, the cpb.UnimplementedTopologyManagerService will automatically return what you've defined here for all un-specified methods
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.
Done
return nil, status.Errorf(codes.Unimplemented, "DeleteTopology RPC method not implemented.") | ||
} | ||
|
||
func main() { |
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.
main() should look something like this (the alts creds are required for directpath):
func main() {
flag.Parse()
addr := fmt.Sprintf(":%d", *port)
lis, err := net.Listen("tcp6", addr)
if err != nil {
log.Fatalf("Failed to listen: %v", err)
}
creds := alts.NewServerCreds(alts.DefaultServerOptions())
s := grpc.NewServer(grpc.Creds(creds))
gpb.RegisterGNMIServer(s, &server{})
log.Infof("Server listening at %v", lis.Addr())
if err := s.Serve(lis); err != nil {
log.Fatalf("Failed to serve: %v", err)
}
}
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.
Done
No description provided.