Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
d6ce7190
Commit
d6ce7190
authored
Sep 09, 2015
by
Chao Xu
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13732 from hurf/ac_doc
Doc fix for admission/plugin.go
parents
183c6e2e
7b4f91c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
plugins.go
pkg/admission/plugins.go
+6
-7
No files found.
pkg/admission/plugins.go
View file @
d6ce7190
...
...
@@ -37,7 +37,7 @@ var (
plugins
=
make
(
map
[
string
]
Factory
)
)
// GetPlugins enumerates the
// GetPlugins enumerates the
names of all registered plugins.
func
GetPlugins
()
[]
string
{
pluginsMutex
.
Lock
()
defer
pluginsMutex
.
Unlock
()
...
...
@@ -48,7 +48,7 @@ func GetPlugins() []string {
return
keys
}
// RegisterPlugin registers a plugin Factory by name.
This
// RegisterPlugin registers a plugin Factory by name. This
// is expected to happen during app startup.
func
RegisterPlugin
(
name
string
,
plugin
Factory
)
{
pluginsMutex
.
Lock
()
...
...
@@ -61,11 +61,10 @@ func RegisterPlugin(name string, plugin Factory) {
plugins
[
name
]
=
plugin
}
// GetPlugin creates an instance of the named plugin, or nil if
// the name is not known. The error return is only used if the named provider
// was known but failed to initialize. The config parameter specifies the
// io.Reader handler of the configuration file for the cloud provider, or nil
// for no configuration.
// GetPlugin creates an instance of the named plugin, or nil if the name is not
// known. The error is returned only when the named provider was known but failed
// to initialize. The config parameter specifies the io.Reader handler of the
// configuration file for the cloud provider, or nil for no configuration.
func
GetPlugin
(
name
string
,
client
client
.
Interface
,
config
io
.
Reader
)
(
Interface
,
error
)
{
pluginsMutex
.
Lock
()
defer
pluginsMutex
.
Unlock
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment