Skip to content

Commit 34fc0fb

Browse files
committed
Add handwritten code related to LockState and UnlockState RPCs
1 parent 4163151 commit 34fc0fb

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tfprotov6/state_store.go

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ type StateStoreServer interface {
2727

2828
// DeleteState instructs a given state store to delete a specific state (i.e. a CE workspace)
2929
DeleteState(context.Context, *DeleteStateRequest) (*DeleteStateResponse, error)
30+
31+
// LockState instructs a given state store to lock a specific state (i.e. a CE workspace)
32+
LockState(context.Context, *LockStateRequest) (*LockStateResponse, error)
33+
34+
// UnlockState instructs a given state store to unlock a specific state (i.e. a CE workspace)
35+
UnlockState(context.Context, *UnlockStateRequest) (*UnlockStateResponse, error)
3036
}
3137

3238
type ValidateStateStoreRequest struct {
@@ -123,3 +129,24 @@ type DeleteStateRequest struct {
123129
type DeleteStateResponse struct {
124130
Diagnostics []*Diagnostic
125131
}
132+
133+
type LockStateRequest struct {
134+
TypeName string
135+
StateId string
136+
Operation string
137+
}
138+
139+
type LockStateResponse struct {
140+
LockId string
141+
Diagnostics []*Diagnostic
142+
}
143+
144+
type UnlockStateRequest struct {
145+
TypeName string
146+
StateId string
147+
LockId string
148+
}
149+
150+
type UnlockStateResponse struct {
151+
Diagnostics []*Diagnostic
152+
}

0 commit comments

Comments
 (0)