basic.go 540 B

1234567891011121314151617181920212223242526272829
  1. package service
  2. import (
  3. "context"
  4. "log/slog"
  5. )
  6. import (
  7. "google.golang.org/protobuf/types/known/emptypb"
  8. )
  9. import (
  10. "protocol-server/common"
  11. pb "protocol-server/rpc_idl/dr_protocol_pb"
  12. )
  13. type BasicServer struct {
  14. pb.UnimplementedBasicServer
  15. }
  16. func (s *BasicServer) SoftwareInfo(_ context.Context, in *emptypb.Empty) (*pb.SoftwareInfoReply, error) {
  17. slog.Info("Received SoftwareInfo")
  18. return &pb.SoftwareInfoReply{
  19. Module: common.Module,
  20. Desc: common.Desc,
  21. Build: common.Build,
  22. Version: common.Version,
  23. }, nil
  24. }