plugin

package
v0.0.0-...-26d813d Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, dependencies *Dependencies) error

Init build and load specific plugins through configuration. config contain the configuration of all plugins, including plugin loading configuration and plugin custom configuration. e.g.:

plugins:
- name: registry-filter
  # plugin custom configuration
  config:
  - permission: allow
    patterns:
    - docker.io/secretflow

func Register

func Register(name string, p Plugin)

Register plugin.

Types

type Dependencies

type Dependencies struct {
	AgentConfig *config.AgentConfig
	KubeClient  kubernetes.Interface
}

type Plugin

type Plugin interface {
	Type() string
	Init(context.Context, *Dependencies, *config.PluginCfg) error
}

Plugin is a unified abstraction of plugin. External plugins need to implement this interface.

func Get

func Get(name string) Plugin

Get plugin.

Jump to

Keyboard shortcuts

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