Documentation
¶
Index ¶
- Constants
- type PluginInstallEvent
- type PluginInstallResponse
- type PluginManager
- func (p *PluginManager) AddPluginRegisterHandler(handler func(r plugin_entities.PluginLifetime) error)
- func (p *PluginManager) BackwardsInvocation() dify_invocation.BackwardsInvocation
- func (p *PluginManager) Get(identity plugin_entities.PluginUniqueIdentifier) (plugin_entities.PluginLifetime, error)
- func (p *PluginManager) GetAsset(id string) ([]byte, error)
- func (p *PluginManager) GetDeclaration(plugin_unique_identifier plugin_entities.PluginUniqueIdentifier, ...) (*plugin_entities.PluginDeclaration, error)
- func (p *PluginManager) GetPackage(plugin_unique_identifier plugin_entities.PluginUniqueIdentifier) ([]byte, error)
- func (p *PluginManager) InstallToAWSFromPkg(originalPackager []byte, decoder decoder.PluginDecoder, source string, ...) (*stream.Stream[PluginInstallResponse], error)
- func (p *PluginManager) InstallToLocal(plugin_unique_identifier plugin_entities.PluginUniqueIdentifier, source string, ...) (*stream.Stream[PluginInstallResponse], error)
- func (p *PluginManager) Launch(configuration *app.Config)
- func (p *PluginManager) ReinstallToAWSFromPkg(originalPackager []byte, decoder decoder.PluginDecoder) (*stream.Stream[PluginInstallResponse], error)
- func (p *PluginManager) SavePackage(plugin_unique_identifier plugin_entities.PluginUniqueIdentifier, pkg []byte, ...) (*plugin_entities.PluginDeclaration, error)
- func (p *PluginManager) UninstallFromLocal(identity plugin_entities.PluginUniqueIdentifier) error
Constants ¶
View Source
const (
PLUGIN_SERVERLESS_CACHE_KEY = "serverless:runtime:%s"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PluginInstallEvent ¶
type PluginInstallEvent string
const ( PluginInstallEventInfo PluginInstallEvent = "info" PluginInstallEventDone PluginInstallEvent = "done" PluginInstallEventError PluginInstallEvent = "error" )
type PluginInstallResponse ¶
type PluginInstallResponse struct { Event PluginInstallEvent `json:"event"` Data string `json:"data"` }
type PluginManager ¶
type PluginManager struct {
// contains filtered or unexported fields
}
func InitGlobalManager ¶
func InitGlobalManager(oss oss.OSS, configuration *app.Config) *PluginManager
func Manager ¶
func Manager() *PluginManager
func (*PluginManager) AddPluginRegisterHandler ¶
func (p *PluginManager) AddPluginRegisterHandler(handler func(r plugin_entities.PluginLifetime) error)
func (*PluginManager) BackwardsInvocation ¶
func (p *PluginManager) BackwardsInvocation() dify_invocation.BackwardsInvocation
func (*PluginManager) Get ¶
func (p *PluginManager) Get( identity plugin_entities.PluginUniqueIdentifier, ) (plugin_entities.PluginLifetime, error)
func (*PluginManager) GetDeclaration ¶
func (p *PluginManager) GetDeclaration( plugin_unique_identifier plugin_entities.PluginUniqueIdentifier, tenant_id string, runtime_type plugin_entities.PluginRuntimeType, ) ( *plugin_entities.PluginDeclaration, error, )
func (*PluginManager) GetPackage ¶
func (p *PluginManager) GetPackage( plugin_unique_identifier plugin_entities.PluginUniqueIdentifier, ) ([]byte, error)
func (*PluginManager) InstallToAWSFromPkg ¶
func (p *PluginManager) InstallToAWSFromPkg( originalPackager []byte, decoder decoder.PluginDecoder, source string, meta map[string]any, ) ( *stream.Stream[PluginInstallResponse], error, )
InstallToAWSFromPkg installs a plugin to AWS Lambda
func (*PluginManager) InstallToLocal ¶
func (p *PluginManager) InstallToLocal( plugin_unique_identifier plugin_entities.PluginUniqueIdentifier, source string, meta map[string]any, ) ( *stream.Stream[PluginInstallResponse], error, )
InstallToLocal installs a plugin to local
func (*PluginManager) Launch ¶
func (p *PluginManager) Launch(configuration *app.Config)
func (*PluginManager) ReinstallToAWSFromPkg ¶
func (p *PluginManager) ReinstallToAWSFromPkg( originalPackager []byte, decoder decoder.PluginDecoder, ) ( *stream.Stream[PluginInstallResponse], error, )
* Reinstall a plugin to AWS Lambda, update function url and name
func (*PluginManager) SavePackage ¶
func (p *PluginManager) SavePackage(plugin_unique_identifier plugin_entities.PluginUniqueIdentifier, pkg []byte, thirdPartySignatureVerificationConfig *decoder.ThirdPartySignatureVerificationConfig) ( *plugin_entities.PluginDeclaration, error, )
func (*PluginManager) UninstallFromLocal ¶
func (p *PluginManager) UninstallFromLocal(identity plugin_entities.PluginUniqueIdentifier) error
UninstallFromLocal uninstalls a plugin from local storage once deleted, local runtime will automatically shutdown and exit after several time
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package local_runtime handles the local plugin runtime management
|
Package local_runtime handles the local plugin runtime management |
Click to show internal directories.
Click to hide internal directories.