plugin

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyPluginManager

type DummyPluginManager struct{}

DummyPluginManager is used to disable the plugin service

func NewDummyPluginManager

func NewDummyPluginManager() *DummyPluginManager

func (*DummyPluginManager) Get

func (*DummyPluginManager) GetAll

func (*DummyPluginManager) HeartBeat

func (s *DummyPluginManager) HeartBeat(_ context.Context, _ string) error

func (*DummyPluginManager) Ready

func (s *DummyPluginManager) Ready() bool

func (*DummyPluginManager) RefreshToken

func (*DummyPluginManager) Register

func (*DummyPluginManager) StartCleanup

func (s *DummyPluginManager) StartCleanup(_ context.Context)

func (*DummyPluginManager) Unregister

func (s *DummyPluginManager) Unregister(_ context.Context, _ string)

type PluginManager

type PluginManager struct {
	PluginManagerConfig
	// contains filtered or unexported fields
}

func NewPluginManager

func NewPluginManager(authRepo storage.AuthRepository, opts ...PluginManagerOption) *PluginManager

func (*PluginManager) Get

func (p *PluginManager) Get(ctx context.Context, slug string) (entities.Plugin, error)

func (*PluginManager) GetAll

func (p *PluginManager) GetAll(_ context.Context) ([]entities.Plugin, []time.Time)

func (*PluginManager) HeartBeat

func (p *PluginManager) HeartBeat(ctx context.Context, slug string) error

func (*PluginManager) Ready

func (p *PluginManager) Ready() bool

func (*PluginManager) RefreshToken

func (p *PluginManager) RefreshToken(ctx context.Context, auth *entities.AuthPlugin, slug string) (*entities.ClientToken, error)

func (*PluginManager) Register

func (p *PluginManager) Register(ctx context.Context, plugin *entities.Plugin) (*entities.ClientToken, error)

func (*PluginManager) StartCleanup

func (p *PluginManager) StartCleanup(ctx context.Context)

func (*PluginManager) Unregister

func (p *PluginManager) Unregister(ctx context.Context, slug string)

type PluginManagerConfig

type PluginManagerConfig struct {
	// contains filtered or unexported fields
}

type PluginManagerOption

type PluginManagerOption func(*PluginManagerConfig)

func WithInterval

func WithInterval(interval time.Duration) PluginManagerOption

func WithTimeout

func WithTimeout(timeout time.Duration) PluginManagerOption

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL