Documentation
¶
Index ¶
- type FakeBackendProcessProvider
- type FakeLicensingService
- func (t *FakeLicensingService) ContentDeliveryPrefix() string
- func (t *FakeLicensingService) Edition() string
- func (*FakeLicensingService) EnabledFeatures() map[string]bool
- func (t *FakeLicensingService) Environment() map[string]string
- func (t *FakeLicensingService) Expiry() int64
- func (*FakeLicensingService) FeatureEnabled(_ string) bool
- func (t *FakeLicensingService) LicenseURL(_ bool) string
- func (t *FakeLicensingService) StateInfo() string
- 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 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) GetPluginDownloadOptions(ctx context.Context, pluginID, version string, opts repo.CompatOpts) (*repo.PluginDownloadOptions, error)
- type FakePluginStorage
- func (s *FakePluginStorage) Add(ctx context.Context, pluginID string, z *zip.ReadCloser) (*storage.ExtractedPluginArchive, error)
- func (s *FakePluginStorage) Register(ctx context.Context, pluginID, pluginDir string) error
- func (s *FakePluginStorage) Remove(ctx context.Context, pluginID string) error
- type FakeProcessManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeBackendProcessProvider ¶
func NewFakeBackendProcessProvider ¶
func NewFakeBackendProcessProvider() *FakeBackendProcessProvider
func (*FakeBackendProcessProvider) BackendFactory ¶
func (pr *FakeBackendProcessProvider) BackendFactory(_ context.Context, p *plugins.Plugin) backendplugin.PluginFactoryFunc
type FakeLicensingService ¶
type FakeLicensingService struct {
TokenRaw string
}
func NewFakeLicensingService ¶
func NewFakeLicensingService() *FakeLicensingService
func (*FakeLicensingService) ContentDeliveryPrefix ¶
func (t *FakeLicensingService) ContentDeliveryPrefix() string
func (*FakeLicensingService) Edition ¶
func (t *FakeLicensingService) Edition() string
func (*FakeLicensingService) EnabledFeatures ¶
func (*FakeLicensingService) EnabledFeatures() map[string]bool
func (*FakeLicensingService) Environment ¶
func (t *FakeLicensingService) Environment() map[string]string
func (*FakeLicensingService) Expiry ¶
func (t *FakeLicensingService) Expiry() int64
func (*FakeLicensingService) FeatureEnabled ¶
func (*FakeLicensingService) FeatureEnabled(_ string) bool
func (*FakeLicensingService) LicenseURL ¶
func (t *FakeLicensingService) LicenseURL(_ bool) string
func (*FakeLicensingService) StateInfo ¶
func (t *FakeLicensingService) StateInfo() string
type FakeLoader ¶
type FakeLoader struct {
LoadFunc func(_ context.Context, _ plugins.Class, paths []string) ([]*plugins.Plugin, error)
UnloadFunc func(_ context.Context, _ string) 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 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)
GetPluginDownloadOptionsFunc func(_ context.Context, pluginID, version string, _ repo.CompatOpts) (*repo.PluginDownloadOptions, 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) GetPluginDownloadOptions ¶
func (r *FakePluginRepo) GetPluginDownloadOptions(ctx context.Context, pluginID, version string, opts repo.CompatOpts) (*repo.PluginDownloadOptions, error)
GetPluginDownloadOptions fetches information for downloading the requested plugin.
type FakePluginStorage ¶
type FakePluginStorage struct {
Store map[string]struct{}
AddFunc func(_ context.Context, pluginID string, z *zip.ReadCloser) (*storage.ExtractedPluginArchive, error)
RegisterFunc func(_ context.Context, pluginID, pluginDir string) error
RemoveFunc func(_ context.Context, pluginID string) error
}
func NewFakePluginStorage ¶
func NewFakePluginStorage() *FakePluginStorage
func (*FakePluginStorage) Add ¶
func (s *FakePluginStorage) Add(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
Click to show internal directories.
Click to hide internal directories.