Plugins: Replace CDN class with FS CDN type (#113968)

replace cdn class with fs type
This commit is contained in:
Will Browne
2025-11-20 14:03:24 +00:00
committed by GitHub
parent 3999d108f7
commit 7d179120b6
21 changed files with 122 additions and 114 deletions
+8 -4
View File
@@ -433,6 +433,7 @@ func (f *FakeActionSetRegistry) RegisterActionSets(_ context.Context, _ string,
type FakePluginFS struct {
OpenFunc func(name string) (fs.File, error)
RemoveFunc func() error
TypeFunc func() plugins.FSType
RelFunc func(string) (string, error)
base string
@@ -444,10 +445,6 @@ func NewFakePluginFS(base string) *FakePluginFS {
}
}
func (f *FakePluginFS) Type() string {
return "fake"
}
func (f *FakePluginFS) Open(name string) (fs.File, error) {
if f.OpenFunc != nil {
return f.OpenFunc(name)
@@ -462,6 +459,13 @@ func (f *FakePluginFS) Rel(_ string) (string, error) {
return "", nil
}
func (f *FakePluginFS) Type() plugins.FSType {
if f.TypeFunc != nil {
return f.TypeFunc()
}
return "fake"
}
func (f *FakePluginFS) Base() string {
return f.base
}