plugin

package
v0.0.0-...-8a48855 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPluginSource

func GetPluginSource(client pluginclientset.Interface, k8sClient kubernetes.Interface, ns string, name string) ([]byte, error)

GetPluginSource has the logic to get the actual plugin source code from information in Plugin.Spec

Types

type Config

type Config struct {
	Status         int32      `json:"status"`
	PluginMetadata []Metadata `json:"plugins"`
	Errors         []error    `json:"errors,omitempty"`
}

Config holds the information required by the frontend application to bootstrap.

type Handler

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

Handler manages all endpoints related to plugin use cases, such as list and get.

func NewPluginHandler

func NewPluginHandler(cManager clientapi.ClientManager) *Handler

NewPluginHandler creates plugin.Handler.

func (*Handler) Install

func (h *Handler) Install(r *gin.RouterGroup)

Install creates new endpoints for plugins. All information that any plugin would want to expose by creating new endpoints should be kept here, i.e. plugin service might want to create endpoint to list available proxy paths to another backend.

By default, endpoint for getting and listing plugins is installed. It allows user to list the installed plugins and get the source code for a plugin.

type Metadata

type Metadata struct {
	Name         string   `json:"name"`
	Path         string   `json:"path"`
	Dependencies []string `json:"dependencies"`
}

Metadata holds least possible plugin information for Config.

type Plugin

type Plugin struct {
	ObjectMeta   api.ObjectMeta `json:"objectMeta"`
	TypeMeta     api.TypeMeta   `json:"typeMeta"`
	Name         string         `json:"name"`
	Path         string         `json:"path"`
	Dependencies []string       `json:"dependencies"`
}

PluginList holds only necessary information and is used to map v1alpha1.Plugin to plugin.Plugin

type PluginCell

type PluginCell v1alpha1.Plugin

func (PluginCell) GetProperty

type PluginList

type PluginList struct {
	ListMeta api.ListMeta `json:"listMeta"`
	Items    []Plugin     `json:"items"`
	Errors   []error      `json:"errors"`
}

PluginList holds only necessary information and is used to map v1alpha1.PluginList to plugin.PluginList

func GetPluginList

func GetPluginList(client pluginclientset.Interface, ns string, dsQuery *dataselect.DataSelectQuery) (*PluginList, error)

GetPluginList returns all the registered plugins

Directories

Path Synopsis
v1alpha1
Package v1alpha1 is the v1alpha1 version of the API.
Package v1alpha1 is the v1alpha1 version of the API.
client
clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
clientset/versioned/typed/apis/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/versioned/typed/apis/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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