@@ -118,6 +118,11 @@ type Interface interface {
118
118
// ConfigureStateStore configures the state store, such as S3 connection in the context of already configured provider
119
119
ConfigureStateStore (ConfigureStateStoreRequest ) ConfigureStateStoreResponse
120
120
121
+ // ReadStateBytes streams byte chunks of a given state file from a state store
122
+ ReadStateBytes (ReadStateBytesRequest ) ReadStateBytesResponseChunk
123
+ // WriteStateBytes streams byte chunks of a given state file into a state store
124
+ WriteStateBytes (WriteStateBytesRequestChunk ) WriteStateBytesResponse
125
+
121
126
// GetStates returns a list of all states (i.e. CE workspaces) managed by a given state store
122
127
GetStates (GetStatesRequest ) GetStatesResponse
123
128
// DeleteState instructs a given state store to delete a specific state (i.e. a CE workspace)
@@ -850,6 +855,43 @@ type ConfigureStateStoreResponse struct {
850
855
Diagnostics tfdiags.Diagnostics
851
856
}
852
857
858
+ type ReadStateBytesRequest struct {
859
+ // TypeName is the name of the state store to read state from
860
+ TypeName string
861
+ // StateId is the ID of a state file to read
862
+ StateId string
863
+ }
864
+
865
+ type ReadStateBytesResponseChunk struct {
866
+ // Data is a chunk of bytes of the given state file being read
867
+ Data []byte
868
+ // Meta is metadata concerning the state file stream
869
+ Meta * StateMeta
870
+ // Diagnostics contains any warnings or errors from the method call.
871
+ Diagnostics tfdiags.Diagnostics
872
+ }
873
+
874
+ type WriteStateBytesRequestChunk struct {
875
+ // TypeName is the name of the state store to write state to
876
+ TypeName string
877
+ // Data is a chunk of bytes of the given state file being written
878
+ Data []byte
879
+ // StateId is the ID of a state file to write
880
+ StateId string
881
+ // Meta is metadata concerning the state file stream
882
+ Meta * StateMeta
883
+ }
884
+
885
+ type WriteStateBytesResponse struct {
886
+ // Diagnostics contains any warnings or errors from the method call.
887
+ Diagnostics tfdiags.Diagnostics
888
+ }
889
+
890
+ type StateMeta struct {
891
+ Checksum []byte
892
+ NumberOfChunks int64
893
+ }
894
+
853
895
type GetStatesRequest struct {
854
896
// TypeName is the name of the state store to request the list of states from
855
897
TypeName string
0 commit comments