Documentation
¶
Index ¶
- Constants
- Variables
- type Plugin
- type RegistryCenter
- func (c *RegistryCenter) DoDelete(pluginType string, action string, data []byte) ([]byte, error)
- func (c *RegistryCenter) DoGet(pluginType string, action string) ([]byte, error)
- func (c *RegistryCenter) DoPost(pluginType string, action string, data []byte) ([]byte, error)
- func (c *RegistryCenter) DoPut(pluginType string, action string, data []byte) ([]byte, error)
- func (c *RegistryCenter) Load() error
- type Result
Constants ¶
View Source
const ( // TypeServiceDiscovery serviceDiscovery plugin TypeServiceDiscovery = "service-discovery" // URLPrefix url prefix URLPrefix = "/plugins/" // POST post method POST = "POST" // GET get method GET = "GET" // PUT put method PUT = "PUT" // DELETE delete method DELETE = "DELETE" )
View Source
const ( // CodeSuccess code success CodeSuccess = iota // CodeError code error CodeError )
Variables ¶
View Source
var ( // ErrPluginNotFound Plugin not found ErrPluginNotFound = errors.New("Plugin not found") )
Functions ¶
This section is empty.
Types ¶
type RegistryCenter ¶
type RegistryCenter struct {
// contains filtered or unexported fields
}
RegistryCenter plugin registry center The plugin registry center will scan plugin dir to find usable plugins. Than plugin registry center do regist spec plugin use a http get access
func NewRegistryCenter ¶
func NewRegistryCenter(cnf *conf.Conf, httpClient *util.FastHTTPClient) *RegistryCenter
NewRegistryCenter get a RegistryCenter
func (*RegistryCenter) DoGet ¶
func (c *RegistryCenter) DoGet(pluginType string, action string) ([]byte, error)
DoGet do get
func (*RegistryCenter) Load ¶
func (c *RegistryCenter) Load() error
Load load plugin from plugin_dir
Click to show internal directories.
Click to hide internal directories.