Skip to content

Commit d63f718

Browse files
mhines01Raj998
authored andcommitted
Update comments on SetPackage to be clear on streaming api
Update Put to fix duplicate and typo
1 parent 61567e5 commit d63f718

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

file/file.proto

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ service File {
2828
// if the file does not exist or there was an error reading the file.
2929
rpc Get(GetRequest) returns (stream GetResponse) {}
3030

31-
// Put streamd data into a file on the target. The file is sent in
31+
// Put streams data into a file on the target. The file is sent in
3232
// sequential messages, each message containing up to 64KB of data. A final
3333
// message must be sent that includes the hash of the data sent. An
3434
// error is returned if the location does not exist or there is an error
3535
// writing the data. If no checksum is received, the target must assume the
36-
// the operation is incomplete and remove the partially transmitted file. The
36+
// operation is incomplete and remove the partially transmitted file. The
3737
// target should initially write the file to a temporary location so a failure
3838
// does not destroy the original file.
3939
rpc Put(stream PutRequest) returns (PutResponse) {}

system/system.proto

+10-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,13 @@ service System {
4646
rpc Time(TimeRequest) returns (TimeResponse) {}
4747

4848
// SetPackage places a software package (possibly including bootable images)
49-
// on the target.
49+
// on the target. The file is sent in sequential messages, each message
50+
// up to 64KB of data. A final message must be sent that includes the hash
51+
// of the data sent. An error is returned if the location does not exist or
52+
// there is an error writing the data. If no checksum is received, the target
53+
// must assume the operation is incomplete and remove the partially
54+
// transmitted file. The target should initially write the file to a temporary location so a failure
55+
// does not destroy the original file.
5056
rpc SetPackage(stream SetPackageRequest) returns (SetPackageResponse) {}
5157

5258
// SwitchControlProcessor will switch from the current route processor to the
@@ -278,9 +284,9 @@ message Package {
278284

279285
// SetPackageRequest will place the package onto the target and optionally mark
280286
// it as the next bootable image. The initial message must be a package
281-
// message containing the filename and information about the file.
282-
// The final message must be a hash message contains the hash of the file
283-
// contents.
287+
// message containing the filename and information about the file. Folloing the
288+
// initial message the contents are then streamed in maximum 64k chunks. The
289+
// final message must be a hash message contains the hash of the file contents.
284290
message SetPackageRequest {
285291
oneof request {
286292
Package package = 1;

0 commit comments

Comments
 (0)