Files
netris-cdc-file-transfer/proto/local_assets_stream_manager.proto
Lutz Justen efca9855e7 [cdc_rsync] [cdc_stream] Switch from scp to sftp (#66)
Use sftp for deploying remote components instead of scp. sftp has the
advantage that it can also create directries, chmod files etc., so
that we can do everything in one call of sftp instead of mixing scp
and ssh calls.

The downside of sftp is that it can't switch to ~ resp. %userprofile%
for the remote side, and we have to assume that sftp starts in the
user's home dir. This is the default and works on my machines!

cdc_rsync and cdc_stream check the CDC_SFTP_COMMAND env var now and
accept --sftp-command flags. If they are not set, the corresponding
scp flag and env var is still used, with scp replaced by sftp. This is
most likely correct as sftp and scp usually reside in the same
directory and share largely identical parameters.
2023-01-18 17:49:52 +01:00

73 lines
2.4 KiB
Protocol Buffer

// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package cdc_ft.localassetsstreammanager;
service LocalAssetsStreamManager {
// Start streaming Workstation assets by mounting their directory on a
// gamelet.
rpc StartSession(StartSessionRequest) returns (StartSessionResponse) {}
// Stop streaming assets from the Workstation to the gamelet.
rpc StopSession(StopSessionRequest) returns (StopSessionResponse) {}
}
// NextID: 12
message StartSessionRequest {
// The resource name of the assets streaming target gamelet, in the form
// "organizations/{org-id}/projects/{proj-id}/pools/{pool-id}/gamelets/{gamelet-id}".
// Only used by Stadia. Should set either this or user_host.
string gamelet_name = 5;
// Directory in the local workstation to stream assets from.
string workstation_directory = 2;
// Caller of the StartSession request.
// Only used by Stadia. May be left unspecified.
enum Origin {
ORIGIN_UNKNOWN = 0;
ORIGIN_CLI = 1;
ORIGIN_PARTNER_PORTAL = 2;
}
Origin origin = 6;
// Username and host, in the form [user@]host.
string user_host = 7;
// Remote directory where to mount the streamed directory.
string mount_dir = 8;
// SSH command to connect to the remote instance.
// Optional, falls back to searching ssh.
string ssh_command = 10;
// SFTP command to copy files to the remote instance.
// Optional, falls back to searching sftp.
string sftp_command = 11;
reserved 1, 3, 4, 9;
}
message StartSessionResponse {}
// NextID: 4
message StopSessionRequest {
// ID of assets streaming target gamelet.
// Only used by Stadia. Should set either this or user_host_dir.
string gamelet_id = 1;
// Username and host, in the form [user@]host. Accepts wildcards * and ?.
string user_host = 2;
// Remote directory where the streamed directory is mounted.
// Accepts wildcards * and ?.
string mount_dir = 3;
}
message StopSessionResponse {}