registry

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package registry provides a registry for EasyP plugin server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Postgres   connectors.Raw
	MigrateDir string
	Driver     string
	Domain     string
}

Config provide connection info for database.

type DockerConfig

type DockerConfig struct {
	Network    string            `json:"network,omitempty"`
	Memory     string            `json:"memory,omitempty"`
	CPUs       string            `json:"cpus,omitempty"`
	User       string            `json:"user,omitempty"`
	Env        map[string]string `json:"env,omitempty"`
	WorkingDir string            `json:"working_dir,omitempty"`
	ReadOnly   bool              `json:"read_only,omitempty"`
	TmpFS      map[string]string `json:"tmpfs,omitempty"`
}

DockerConfig represents Docker execution configuration

type PluginConfig

type PluginConfig struct {
	Docker *DockerConfig `json:"docker,omitempty"`
}

PluginConfig represents the complete plugin configuration

type Registry

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

Registry is a registry for EasyP plugin server.

func New

func New(ctx context.Context, reg *prometheus.Registry, namespace string, cfg Config) (*Registry, error)

New build and returns a new Registry.

func (*Registry) Close

func (r *Registry) Close() error

Close database connection.

func (*Registry) Get

func (r *Registry) Get(ctx context.Context, pluginGroup, pluginName, pluginVersion string) (p core.Plugin, err error)

Get implements core.Registry.

func (*Registry) Health

func (r *Registry) Health(ctx context.Context) error

Health checks the health of the registry.

func (*Registry) List

func (r *Registry) List(ctx context.Context, filter core.PluginFilter) ([]core.PluginInfo, error)

List implements core.Registry.

Jump to

Keyboard shortcuts

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