(ctx context.Context, in *api.ActivateRequest)
| 63 | } |
| 64 | |
| 65 | func (s *service) Activate(ctx context.Context, in *api.ActivateRequest) (*api.ActivateResponse, error) { |
| 66 | log.G(ctx).WithFields(log.Fields{"name": in.Name, "temp": in.Temporary, "mounts": len(in.Mounts)}).Debug("activate mounts") |
| 67 | var opts []mount.ActivateOpt |
| 68 | if in.Temporary { |
| 69 | opts = append(opts, mount.WithTemporary) |
| 70 | } |
| 71 | if in.Labels != nil { |
| 72 | opts = append(opts, mount.WithLabels(in.Labels)) |
| 73 | } |
| 74 | |
| 75 | info, err := s.mm.Activate(ctx, in.Name, mount.FromProto(in.Mounts), opts...) |
| 76 | if err != nil { |
| 77 | return nil, errgrpc.ToGRPC(err) |
| 78 | } |
| 79 | return &api.ActivateResponse{ |
| 80 | Info: proxy.ActivationInfoToProto(info), |
| 81 | }, nil |
| 82 | |
| 83 | } |
| 84 | |
| 85 | func (s *service) Deactivate(ctx context.Context, in *api.DeactivateRequest) (*emptypb.Empty, error) { |
| 86 | log.G(ctx).WithField("name", in.Name).Debug("deactivate mounts") |
nothing calls this directly
no test coverage detected