agent-substrate / agent-substrate/env

WriteFileRequest oneof

Offen
#39 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Go
Sterne
2
Forks
2
Ø Merge
21 Std. 1 Min.
Gemergte PRs (30 T.)
28

Beschreibung

`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;
}
}
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.