cnm

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivateResponse

type ActivateResponse struct {
	Err        string
	Implements []string
}

Response sent by plugin for activation.

type OptionMap

type OptionMap map[string]interface{}

type Plugin

type Plugin struct {
	*common.Plugin
	EndpointType string
	Listener     *common.Listener
}

Plugin is the parent class for CNM plugins.

func NewPlugin

func NewPlugin(name, version, endpointType string) (*Plugin, error)

NewPlugin creates a new Plugin object.

func (*Plugin) DisableDiscovery

func (plugin *Plugin) DisableDiscovery()

DisableDiscovery disables discovery by deleting the plugin spec file.

func (*Plugin) EnableDiscovery

func (plugin *Plugin) EnableDiscovery() error

EnableDiscovery enables Docker to discover the plugin by creating the plugin spec file.

func (*Plugin) Initialize

func (plugin *Plugin) Initialize(config *common.PluginConfig) error

Initialize initializes the plugin and starts the listener.

func (*Plugin) ParseOptions

func (plugin *Plugin) ParseOptions(options OptionMap) OptionMap

ParseOptions returns generic options from a libnetwork request.

func (*Plugin) SendErrorResponse

func (plugin *Plugin) SendErrorResponse(w http.ResponseWriter, errMsg error)

SendErrorResponse sends and logs an error response.

func (*Plugin) Uninitialize

func (plugin *Plugin) Uninitialize()

Uninitialize cleans up the plugin.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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