Documentation ¶
Index ¶
- type FakeBackendProcessProvider
- type FakeLicensingService
- type FakeLoader
- type FakePluginClient
- func (pc *FakePluginClient) CallResource(ctx context.Context, req *backend.CallResourceRequest, ...) error
- func (pc *FakePluginClient) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
- func (pc *FakePluginClient) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error)
- func (pc *FakePluginClient) Decommission() error
- func (pc *FakePluginClient) Exited() bool
- func (pc *FakePluginClient) IsDecommissioned() bool
- func (pc *FakePluginClient) IsManaged() bool
- func (pc *FakePluginClient) Logger() log.Logger
- func (pc *FakePluginClient) PluginID() string
- func (pc *FakePluginClient) PublishStream(_ context.Context, _ *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)
- func (pc *FakePluginClient) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)
- func (pc *FakePluginClient) RunStream(_ context.Context, _ *backend.RunStreamRequest, _ *backend.StreamSender) error
- func (pc *FakePluginClient) Start(_ context.Context) error
- func (pc *FakePluginClient) Stop(_ context.Context) error
- func (pc *FakePluginClient) SubscribeStream(_ context.Context, _ *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)
- type FakePluginFileStore
- type FakePluginFiles
- type FakePluginInstaller
- type FakePluginRegistry
- func (f *FakePluginRegistry) Add(_ context.Context, p *plugins.Plugin) error
- func (f *FakePluginRegistry) Plugin(_ context.Context, id string) (*plugins.Plugin, bool)
- func (f *FakePluginRegistry) Plugins(_ context.Context) []*plugins.Plugin
- func (f *FakePluginRegistry) Remove(_ context.Context, id string) error
- type FakePluginRepo
- func (r *FakePluginRepo) GetPluginArchive(ctx context.Context, pluginID, version string, opts repo.CompatOpts) (*repo.PluginArchive, error)
- func (r *FakePluginRepo) GetPluginArchiveByURL(ctx context.Context, archiveURL string, opts repo.CompatOpts) (*repo.PluginArchive, error)
- func (r *FakePluginRepo) GetPluginArchiveInfo(ctx context.Context, pluginID, version string, opts repo.CompatOpts) (*repo.PluginArchiveInfo, error)
- type FakePluginSource
- type FakePluginStorage
- type FakeProcessManager
- type FakeRoleRegistry
- type FakeSourceRegistry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeBackendProcessProvider ¶
type FakeBackendProcessProvider struct { Requested map[string]int Invoked map[string]int BackendFactoryFunc func(context.Context, *plugins.Plugin) backendplugin.PluginFactoryFunc }
func NewFakeBackendProcessProvider ¶
func NewFakeBackendProcessProvider() *FakeBackendProcessProvider
func (*FakeBackendProcessProvider) BackendFactory ¶
func (pr *FakeBackendProcessProvider) BackendFactory(ctx context.Context, p *plugins.Plugin) backendplugin.PluginFactoryFunc
type FakeLicensingService ¶
type FakeLicensingService struct { LicenseEdition string TokenRaw string LicensePath string LicenseAppURL string }
func NewFakeLicensingService ¶
func NewFakeLicensingService() *FakeLicensingService
func (*FakeLicensingService) AppURL ¶
func (s *FakeLicensingService) AppURL() string
func (*FakeLicensingService) Edition ¶
func (s *FakeLicensingService) Edition() string
func (*FakeLicensingService) Environment ¶
func (s *FakeLicensingService) Environment() []string
func (*FakeLicensingService) Path ¶
func (s *FakeLicensingService) Path() string
type FakeLoader ¶
type FakeLoader struct { LoadFunc func(_ context.Context, _ plugins.PluginSource) ([]*plugins.Plugin, error) UnloadFunc func(_ context.Context, _ string) error }
func (*FakeLoader) Load ¶
func (l *FakeLoader) Load(ctx context.Context, src plugins.PluginSource) ([]*plugins.Plugin, error)
type FakePluginClient ¶
type FakePluginClient struct { ID string Managed bool Log log.Logger backend.CollectMetricsHandlerFunc backend.CheckHealthHandlerFunc backend.QueryDataHandlerFunc backend.CallResourceHandlerFunc backendplugin.Plugin // contains filtered or unexported fields }
func (*FakePluginClient) CallResource ¶
func (pc *FakePluginClient) CallResource(ctx context.Context, req *backend.CallResourceRequest, sender backend.CallResourceResponseSender) error
func (*FakePluginClient) CheckHealth ¶
func (pc *FakePluginClient) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
func (*FakePluginClient) CollectMetrics ¶
func (pc *FakePluginClient) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error)
func (*FakePluginClient) Decommission ¶
func (pc *FakePluginClient) Decommission() error
func (*FakePluginClient) Exited ¶
func (pc *FakePluginClient) Exited() bool
func (*FakePluginClient) IsDecommissioned ¶
func (pc *FakePluginClient) IsDecommissioned() bool
func (*FakePluginClient) IsManaged ¶
func (pc *FakePluginClient) IsManaged() bool
func (*FakePluginClient) Logger ¶
func (pc *FakePluginClient) Logger() log.Logger
func (*FakePluginClient) PluginID ¶
func (pc *FakePluginClient) PluginID() string
func (*FakePluginClient) PublishStream ¶
func (pc *FakePluginClient) PublishStream(_ context.Context, _ *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)
func (*FakePluginClient) QueryData ¶
func (pc *FakePluginClient) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)
func (*FakePluginClient) RunStream ¶
func (pc *FakePluginClient) RunStream(_ context.Context, _ *backend.RunStreamRequest, _ *backend.StreamSender) error
func (*FakePluginClient) SubscribeStream ¶
func (pc *FakePluginClient) SubscribeStream(_ context.Context, _ *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)
type FakePluginFileStore ¶
type FakePluginFiles ¶
type FakePluginFiles struct { OpenFunc func(name string) (fs.File, error) RemoveFunc func() error // contains filtered or unexported fields }
func NewFakePluginFiles ¶
func NewFakePluginFiles(base string) *FakePluginFiles
func (*FakePluginFiles) Base ¶
func (f *FakePluginFiles) Base() string
func (*FakePluginFiles) Files ¶
func (f *FakePluginFiles) Files() ([]string, error)
func (*FakePluginFiles) Remove ¶
func (f *FakePluginFiles) Remove() error
type FakePluginInstaller ¶
type FakePluginInstaller struct { AddFunc func(ctx context.Context, pluginID, version string, opts plugins.CompatOpts) error // Remove removes a plugin from the store. RemoveFunc func(ctx context.Context, pluginID string) error }
func (*FakePluginInstaller) Add ¶
func (i *FakePluginInstaller) Add(ctx context.Context, pluginID, version string, opts plugins.CompatOpts) error
type FakePluginRegistry ¶
func NewFakePluginRegistry ¶
func NewFakePluginRegistry() *FakePluginRegistry
type FakePluginRepo ¶
type FakePluginRepo struct { GetPluginArchiveFunc func(_ context.Context, pluginID, version string, _ repo.CompatOpts) (*repo.PluginArchive, error) GetPluginArchiveByURLFunc func(_ context.Context, archiveURL string, _ repo.CompatOpts) (*repo.PluginArchive, error) GetPluginArchiveInfoFunc func(_ context.Context, pluginID, version string, _ repo.CompatOpts) (*repo.PluginArchiveInfo, error) }
func (*FakePluginRepo) GetPluginArchive ¶
func (r *FakePluginRepo) GetPluginArchive(ctx context.Context, pluginID, version string, opts repo.CompatOpts) (*repo.PluginArchive, error)
GetPluginArchive fetches the requested plugin archive.
func (*FakePluginRepo) GetPluginArchiveByURL ¶
func (r *FakePluginRepo) GetPluginArchiveByURL(ctx context.Context, archiveURL string, opts repo.CompatOpts) (*repo.PluginArchive, error)
GetPluginArchiveByURL fetches the requested plugin from the specified URL.
func (*FakePluginRepo) GetPluginArchiveInfo ¶
func (r *FakePluginRepo) GetPluginArchiveInfo(ctx context.Context, pluginID, version string, opts repo.CompatOpts) (*repo.PluginArchiveInfo, error)
GetPluginArchiveInfo fetches information for downloading the requested plugin.
type FakePluginSource ¶
type FakePluginSource struct { PluginClassFunc func(ctx context.Context) plugins.Class PluginURIsFunc func(ctx context.Context) []string DefaultSignatureFunc func(ctx context.Context) (plugins.Signature, bool) }
func (*FakePluginSource) DefaultSignature ¶
func (*FakePluginSource) PluginClass ¶
func (s *FakePluginSource) PluginClass(ctx context.Context) plugins.Class
func (*FakePluginSource) PluginURIs ¶
func (s *FakePluginSource) PluginURIs(ctx context.Context) []string
type FakePluginStorage ¶
type FakePluginStorage struct {
ExtractFunc func(_ context.Context, pluginID string, z *zip.ReadCloser) (*storage.ExtractedPluginArchive, error)
}
func NewFakePluginStorage ¶
func NewFakePluginStorage() *FakePluginStorage
func (*FakePluginStorage) Extract ¶
func (s *FakePluginStorage) Extract(ctx context.Context, pluginID string, z *zip.ReadCloser) (*storage.ExtractedPluginArchive, error)
type FakeProcessManager ¶
type FakeProcessManager struct { StartFunc func(_ context.Context, pluginID string) error StopFunc func(_ context.Context, pluginID string) error Started map[string]int Stopped map[string]int }
func NewFakeProcessManager ¶
func NewFakeProcessManager() *FakeProcessManager
type FakeRoleRegistry ¶
type FakeRoleRegistry struct {
ExpectedErr error
}
func NewFakeRoleRegistry ¶
func NewFakeRoleRegistry() *FakeRoleRegistry
func (*FakeRoleRegistry) DeclarePluginRoles ¶
func (f *FakeRoleRegistry) DeclarePluginRoles(_ context.Context, _ string, _ string, _ []plugins.RoleRegistration) error
type FakeSourceRegistry ¶
type FakeSourceRegistry struct {
ListFunc func(_ context.Context) []plugins.PluginSource
}
func (*FakeSourceRegistry) List ¶
func (s *FakeSourceRegistry) List(ctx context.Context) []plugins.PluginSource
Click to show internal directories.
Click to hide internal directories.