File tree Expand file tree Collapse file tree
pkg/konnector/controllers/contextstore Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ func NewKey(export kubebindv1alpha2.APIServiceExport) Key {
3636 return Key (export .Namespace + "/" + export .Name )
3737}
3838
39- type ContextStore interface {
39+ type Store interface {
4040 Get (key Key ) (SyncContext , bool )
4141 Set (key Key , value SyncContext )
4242 Delete (key Key )
@@ -52,7 +52,7 @@ type SyncContext struct {
5252 cancel func ()
5353}
5454
55- func New () ContextStore {
55+ func New () Store {
5656 return & contextStore {
5757 store : make (map [Key ]SyncContext ),
5858 }
@@ -62,6 +62,10 @@ func (c *SyncContext) Generation() int64 {
6262 return c .generation
6363}
6464
65+ func (c * SyncContext ) Cancel () {
66+ c .cancel ()
67+ }
68+
6569func (c * contextStore ) Get (key Key ) (SyncContext , bool ) {
6670 c .lock .Lock ()
6771 defer c .lock .Unlock ()
You can’t perform that action at this time.
0 commit comments