File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /*
2+ Copyright The containerd Authors.
3+
4+ Licensed under the Apache License, Version 2.0 (the "License");
5+ you may not use this file except in compliance with the License.
6+ You may obtain a copy of the License at
7+
8+ http://www.apache.org/licenses/LICENSE-2.0
9+
10+ Unless required by applicable law or agreed to in writing, software
11+ distributed under the License is distributed on an "AS IS" BASIS,
12+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ See the License for the specific language governing permissions and
14+ limitations under the License.
15+ */
16+
17+ package dynamic
18+
19+ import "fmt"
20+
21+ // Load loads all plugins at the provided path into containerd.
22+ //
23+ // Load is currently only implemented on non-static, non-gccgo builds for amd64
24+ // and arm64, and plugins must be built with the exact same version of Go as
25+ // containerd itself.
26+ func Load (path string ) (err error ) {
27+ defer func () {
28+ if v := recover (); v != nil {
29+ rerr , ok := v .(error )
30+ if ! ok {
31+ rerr = fmt .Errorf ("%s" , v )
32+ }
33+ err = rerr
34+ }
35+ }()
36+ return loadPlugins (path )
37+ }
Original file line number Diff line number Diff line change 1616 limitations under the License.
1717*/
1818
19- package plugin
19+ package dynamic
2020
2121import (
2222 "fmt"
Original file line number Diff line number Diff line change 1616 limitations under the License.
1717*/
1818
19- package plugin
19+ package dynamic
2020
2121// loadPlugins is not supported;
2222//
Original file line number Diff line number Diff line change @@ -96,24 +96,6 @@ func (r *Registration) URI() string {
9696 return r .Type .String () + "." + r .ID
9797}
9898
99- // Load loads all plugins at the provided path into containerd.
100- //
101- // Load is currently only implemented on non-static, non-gccgo builds for amd64
102- // and arm64, and plugins must be built with the exact same version of Go as
103- // containerd itself.
104- func Load (path string ) (err error ) {
105- defer func () {
106- if v := recover (); v != nil {
107- rerr , ok := v .(error )
108- if ! ok {
109- rerr = fmt .Errorf ("%s" , v )
110- }
111- err = rerr
112- }
113- }()
114- return loadPlugins (path )
115- }
116-
11799// DisableFilter filters out disabled plugins
118100type DisableFilter func (r * Registration ) bool
119101
You can’t perform that action at this time.
0 commit comments