agent-substrate / agent-substrate/env

WriteFileRequest oneof

Đang mở
#39 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
2
Fork
2
Merge trung bình
21 giờ 1 phút
Pull request đã merge (30 ngày)
28

Mô tả

`FileSystemService.WriteRequest` should either accept `path` + `mode` or a `FileChunk` per incoming message. Introducing the `oneof` will help with the ambiguity of what happens when all the fields are set.

It could look like:

```
// Metadata required to initialize the file write stream.
message FileMetadata {
// Absolute or workspace-relative path of the file to write.
string path = 1;
// Optional POSIX file mode permission (e.g. 0644 or 0755).
uint32 mode = 2;
}

// Streamed request chunk for writing data to a file.
message WriteFileRequest {
oneof request {
// Sent only on the first message to initialize the stream.
FileMetadata metadata = 1;

// Sent on all subsequent messages containing the file data.
FileChunk chunk = 2;
}
}
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.