Documentation ¶
Index ¶
- Constants
- func DynamicPluginFunc(pn Name, funcName string) pg.Symbol
- func LoadPlugins()
- func RegisterPlugin(p Plugin)
- type ImplName
- type Instance
- type Manager
- func (pm *Manager) AuditLog() auditlog.AuditLogger
- func (pm *Manager) Auth() auth.Auth
- func (pm *Manager) Cipher() security.Cipher
- func (pm *Manager) Discovery() discovery.AdaptorRepository
- func (pm *Manager) Get(pn Name, name ImplName) *Plugin
- func (pm *Manager) Initialize()
- func (pm *Manager) Instance(pn Name) Instance
- func (pm *Manager) New(pn Name)
- func (pm *Manager) Quota() quota.Manager
- func (pm *Manager) Register(p Plugin)
- func (pm *Manager) Registry() registry.Registry
- func (pm *Manager) Reload(pn Name)
- func (pm *Manager) ReloadAll()
- func (pm *Manager) TLS() tls.TLS
- func (pm *Manager) Tracing() (v tracing.Tracing)
- func (pm *Manager) UUID() uuid.UUID
- type Name
- type Plugin
Constants ¶
const ( BUILDIN = "buildin" STATIC = "static" DYNAMIC = "dynamic" )
Variables ¶
This section is empty.
Functions ¶
func DynamicPluginFunc ¶
DynamicPluginFunc should be called in buildin implement
func LoadPlugins ¶
func LoadPlugins()
LoadPlugins loads and sets all the plugin interfaces's instance.
Types ¶
type ImplName ¶
type ImplName string
ImplName is an alias,it represents a plugin interface implementation.
type Instance ¶
type Instance interface{}
Instance is an instance of a plugin interface which is represented by Name.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages plugin instance generation. Manager keeps the plugin instance currently used by server for every plugin interface.
func (*Manager) AuditLog ¶
func (pm *Manager) AuditLog() auditlog.AuditLogger
func (*Manager) Discovery ¶
func (pm *Manager) Discovery() discovery.AdaptorRepository
func (*Manager) Instance ¶
Instance gets an plugin instance. What plugin instance you get is depended on the supplied go plugin files (high priority) or the plugin config(low priority)
The go plugin file should be {plugins_dir}/{Name}_plugin.so. ('plugins_dir' must be configured as a valid path in service-center config.) The plugin config in service-center config should be: {Name}_plugin = {ImplName}
e.g. For registry plugin, you can set a config in app.conf: plugins_dir = /home, and supply a go plugin file: /home/registry_plugin.so; or if you want to use etcd as registry, you can set a config in app.conf: registry_plugin = etcd.
func (*Manager) New ¶
New initializes and sets the instance of a plugin interface, but not returns it. Use 'Instance' if you want to get the plugin instance. We suggest you to use 'Instance' instead of 'New'.
type Name ¶
type Name int
Name is an alias, it represents a plugin interface.
func (Name) ActiveConfigs ¶
func (pn Name) ActiveConfigs() util.JSONObject
ActiveConfigs returns all the server's plugin config
func (Name) ClearConfigs ¶
func (pn Name) ClearConfigs()
ClearConfigs clears the server's plugin config
Directories ¶
Path | Synopsis |
---|---|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. |
etcd
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. |
security
|
|