File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
1111 "encoding/hex"
1212 "encoding/json"
1313 "fmt"
14+ "github.com/hashicorp/terraform-plugin-sdk/v2/diag"
1415 "io"
1516 "io/ioutil"
1617 "log"
Original file line number Diff line number Diff line change 44package tfresource
55
66import (
7+ "context"
78 "sync"
89 "time"
910)
@@ -115,3 +116,31 @@ type StatefullyDeletedResource interface {
115116type SynchronizedResource interface {
116117 GetMutex () * sync.Mutex
117118}
119+
120+ // SIGINT Changes
121+ type ResourceCreatorWithContext interface {
122+ ResourceDataWriter
123+ // ID identifies the resource, or a work request to Create the resource.
124+ ID () string
125+ CreateWithContext (ctx context.Context ) error
126+ }
127+
128+ type ResourceReaderWithContext interface {
129+ ResourceDataWriter
130+ ResourceFetcherWithContext
131+ }
132+ type ResourceUpdaterWithContext interface {
133+ ResourceDataWriter
134+ UpdateWithContext (ctx context.Context ) error
135+ }
136+ type ResourceDeleterWithContext interface {
137+ ResourceVoider
138+ // ID identifies the resource, or a work request to Create the resource.
139+ ID () string
140+ DeleteWithContext (ctx context.Context ) error
141+ }
142+ type ResourceFetcherWithContext interface {
143+ // Get should Update the s.Resource, and is used by ReadResource() to populate s.D
144+ // Get() may expect s.D.Id() to be set, but not s.Resource, or anything else in s.D
145+ GetWithContext (ctx context.Context ) error
146+ }
You can’t perform that action at this time.
0 commit comments