Skip to content

Commit fb4c1fc

Browse files
SarahFrenchradeksimko
authored andcommitted
Seeing what it looks like to avoid 'messages' name
1 parent d297e3f commit fb4c1fc

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

tfprotov6/state_store.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,28 +53,30 @@ type ReadStateBytesRequest struct {
5353
}
5454

5555
type ReadStateBytesStream struct {
56-
Messages iter.Seq[ReadStateByteStreamMsg]
56+
Chunks iter.Seq[ReadStateByteChunk]
5757
}
5858

5959
type WriteStateBytesStream struct {
60-
Messages iter.Seq[WriteStateBytesStreamMsg]
60+
Chunks iter.Seq[WriteStateBytesChunk]
6161
}
6262

63-
// WriteStateBytesStreamMsg contains paired data:
63+
// WriteStateBytesChunk contains:
6464
// 1. A chunk of state data, received from Terraform core to be persisted.
6565
// 2. Any gRPC-related errors the provider server encountered when
6666
// receiving data from Terraform core.
67-
type WriteStateBytesStreamMsg struct {
68-
Chunk StateByteChunk
69-
Err error
67+
//
68+
// If a gRPC error is set, then the chunk should be empty.
69+
type WriteStateBytesChunk struct {
70+
StateByteChunk
71+
Err error
7072
}
7173

7274
type WriteStateBytesResponse struct {
7375
Diagnostics []*Diagnostic
7476
}
7577

76-
type ReadStateByteStreamMsg struct {
77-
Chunk StateByteChunk
78+
type ReadStateByteChunk struct {
79+
StateByteChunk
7880
Diagnostics []*Diagnostic
7981
}
8082

0 commit comments

Comments
 (0)