plugin

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Copyright 2018 the Heptio Ark contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2018 the Heptio Ark contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2018 the Heptio Ark contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2018 the Heptio Ark contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2018 the Heptio Ark contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2018 the Heptio Ark contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2018 the Heptio Ark contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2018 the Heptio Ark contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2018 the Heptio Ark contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2018 the Heptio Ark contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2018 the Heptio Ark contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2018 the Heptio Ark contributors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var Handshake = plugin.HandshakeConfig{
	ProtocolVersion:  1,
	MagicCookieKey:   "ARK_PLUGIN",
	MagicCookieValue: "hello",
}

Handshake is configuration information that allows go-plugin clients and servers to perform a handshake.

TODO(ncdc): this should probably be a function so it can't be mutated, and we should probably move it to handshake.go.

Functions

func NewLogger

func NewLogger() logrus.FieldLogger

NewLogger returns a logger that is suitable for use within an Velero plugin.

Types

type BackupItemActionGRPCClient

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

BackupItemActionGRPCClient implements the backup/ItemAction interface and uses a gRPC client to make calls to the plugin server.

func (*BackupItemActionGRPCClient) AppliesTo

func (*BackupItemActionGRPCClient) Execute

type BackupItemActionGRPCServer

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

BackupItemActionGRPCServer implements the proto-generated BackupItemActionServer interface, and accepts gRPC calls and forwards them to an implementation of the pluggable interface.

func (*BackupItemActionGRPCServer) AppliesTo

func (*BackupItemActionGRPCServer) Execute

type BackupItemActionPlugin

type BackupItemActionPlugin struct {
	plugin.NetRPCUnsupportedPlugin
	// contains filtered or unexported fields
}

BackupItemActionPlugin is an implementation of go-plugin's Plugin interface with support for gRPC for the backup/ItemAction interface.

func NewBackupItemActionPlugin

func NewBackupItemActionPlugin(options ...pluginOption) *BackupItemActionPlugin

NewBackupItemActionPlugin constructs a BackupItemActionPlugin.

func (*BackupItemActionPlugin) GRPCClient

func (p *BackupItemActionPlugin) GRPCClient(c *grpc.ClientConn) (interface{}, error)

GRPCClient returns a clientDispenser for BackupItemAction gRPC clients.

func (*BackupItemActionPlugin) GRPCServer

func (p *BackupItemActionPlugin) GRPCServer(s *grpc.Server) error

GRPCServer registers a BackupItemAction gRPC server.

type BlockStoreGRPCClient

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

BlockStoreGRPCClient implements the cloudprovider.BlockStore interface and uses a gRPC client to make calls to the plugin server.

func (*BlockStoreGRPCClient) CreateSnapshot

func (c *BlockStoreGRPCClient) CreateSnapshot(volumeID, volumeAZ string, tags map[string]string) (string, error)

CreateSnapshot creates a snapshot of the specified block volume, and applies the provided set of tags to the snapshot.

func (*BlockStoreGRPCClient) CreateVolumeFromSnapshot

func (c *BlockStoreGRPCClient) CreateVolumeFromSnapshot(snapshotID, volumeType, volumeAZ string, iops *int64) (string, error)

CreateVolumeFromSnapshot creates a new block volume, initialized from the provided snapshot, and with the specified type and IOPS (if using provisioned IOPS).

func (*BlockStoreGRPCClient) DeleteSnapshot

func (c *BlockStoreGRPCClient) DeleteSnapshot(snapshotID string) error

DeleteSnapshot deletes the specified volume snapshot.

func (*BlockStoreGRPCClient) GetVolumeID

func (c *BlockStoreGRPCClient) GetVolumeID(pv runtime.Unstructured) (string, error)

func (*BlockStoreGRPCClient) GetVolumeInfo

func (c *BlockStoreGRPCClient) GetVolumeInfo(volumeID, volumeAZ string) (string, *int64, error)

GetVolumeInfo returns the type and IOPS (if using provisioned IOPS) for a specified block volume.

func (*BlockStoreGRPCClient) Init

func (c *BlockStoreGRPCClient) Init(config map[string]string) error

Init prepares the BlockStore for usage using the provided map of configuration key-value pairs. It returns an error if the BlockStore cannot be initialized from the provided config.

func (*BlockStoreGRPCClient) SetVolumeID

func (c *BlockStoreGRPCClient) SetVolumeID(pv runtime.Unstructured, volumeID string) (runtime.Unstructured, error)

type BlockStoreGRPCServer

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

BlockStoreGRPCServer implements the proto-generated BlockStoreServer interface, and accepts gRPC calls and forwards them to an implementation of the pluggable interface.

func (*BlockStoreGRPCServer) CreateSnapshot

CreateSnapshot creates a snapshot of the specified block volume, and applies the provided set of tags to the snapshot.

func (*BlockStoreGRPCServer) CreateVolumeFromSnapshot

func (s *BlockStoreGRPCServer) CreateVolumeFromSnapshot(ctx context.Context, req *proto.CreateVolumeRequest) (*proto.CreateVolumeResponse, error)

CreateVolumeFromSnapshot creates a new block volume, initialized from the provided snapshot, and with the specified type and IOPS (if using provisioned IOPS).

func (*BlockStoreGRPCServer) DeleteSnapshot

DeleteSnapshot deletes the specified volume snapshot.

func (*BlockStoreGRPCServer) GetVolumeID

func (*BlockStoreGRPCServer) GetVolumeInfo

GetVolumeInfo returns the type and IOPS (if using provisioned IOPS) for a specified block volume.

func (*BlockStoreGRPCServer) Init

Init prepares the BlockStore for usage using the provided map of configuration key-value pairs. It returns an error if the BlockStore cannot be initialized from the provided config.

func (*BlockStoreGRPCServer) SetVolumeID

type BlockStorePlugin

type BlockStorePlugin struct {
	plugin.NetRPCUnsupportedPlugin
	// contains filtered or unexported fields
}

BlockStorePlugin is an implementation of go-plugin's Plugin interface with support for gRPC for the cloudprovider/BlockStore interface.

func NewBlockStorePlugin

func NewBlockStorePlugin(options ...pluginOption) *BlockStorePlugin

NewBlockStorePlugin constructs a BlockStorePlugin.

func (*BlockStorePlugin) GRPCClient

func (p *BlockStorePlugin) GRPCClient(c *grpc.ClientConn) (interface{}, error)

GRPCClient returns a BlockStore gRPC client.

func (*BlockStorePlugin) GRPCServer

func (p *BlockStorePlugin) GRPCServer(s *grpc.Server) error

GRPCServer registers a BlockStore gRPC server.

type ClientDispenser added in v0.10.0

type ClientDispenser interface {
	// contains filtered or unexported methods
}

type CloseFunc

type CloseFunc func() error

CloseFunc is used to signal to the source of data that the StreamReadCloser has been closed.

type HandlerInitializer added in v0.10.0

type HandlerInitializer func(logger logrus.FieldLogger) (interface{}, error)

HandlerInitializer is a function that initializes and returns a new instance of one of Velero's plugin interfaces (ObjectStore, BlockStore, BackupItemAction, RestoreItemAction).

type Interface

type Interface interface {
	plugin.Plugin
	// contains filtered or unexported methods
}

Interface represents a Velero plugin.

type Manager

type Manager interface {
	// GetObjectStore returns the ObjectStore plugin for name.
	GetObjectStore(name string) (cloudprovider.ObjectStore, error)

	// GetBlockStore returns the BlockStore plugin for name.
	GetBlockStore(name string) (cloudprovider.BlockStore, error)

	// GetBackupItemActions returns all backup item action plugins.
	GetBackupItemActions() ([]backup.ItemAction, error)

	// GetBackupItemAction returns the backup item action plugin for name.
	GetBackupItemAction(name string) (backup.ItemAction, error)

	// GetRestoreItemActions returns all restore item action plugins.
	GetRestoreItemActions() ([]restore.ItemAction, error)

	// GetRestoreItemAction returns the restore item action plugin for name.
	GetRestoreItemAction(name string) (restore.ItemAction, error)

	// CleanupClients terminates all of the Manager's running plugin processes.
	CleanupClients()
}

Manager manages the lifecycles of plugins.

func NewManager

func NewManager(logger logrus.FieldLogger, level logrus.Level, registry Registry) Manager

NewManager constructs a manager for getting plugins.

type ObjectStoreGRPCClient

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

ObjectStoreGRPCClient implements the cloudprovider.ObjectStore interface and uses a gRPC client to make calls to the plugin server.

func (*ObjectStoreGRPCClient) CreateSignedURL

func (c *ObjectStoreGRPCClient) CreateSignedURL(bucket, key string, ttl time.Duration) (string, error)

CreateSignedURL creates a pre-signed URL for the given bucket and key that expires after ttl.

func (*ObjectStoreGRPCClient) DeleteObject

func (c *ObjectStoreGRPCClient) DeleteObject(bucket, key string) error

DeleteObject removes object with the specified key from the given bucket.

func (*ObjectStoreGRPCClient) GetObject

func (c *ObjectStoreGRPCClient) GetObject(bucket, key string) (io.ReadCloser, error)

GetObject retrieves the object with the given key from the specified bucket in object storage.

func (*ObjectStoreGRPCClient) Init

func (c *ObjectStoreGRPCClient) Init(config map[string]string) error

Init prepares the ObjectStore for usage using the provided map of configuration key-value pairs. It returns an error if the ObjectStore cannot be initialized from the provided config.

func (*ObjectStoreGRPCClient) ListCommonPrefixes

func (c *ObjectStoreGRPCClient) ListCommonPrefixes(bucket, prefix, delimiter string) ([]string, error)

ListCommonPrefixes gets a list of all object key prefixes that come after the provided prefix and before the provided delimiter (this is often used to simulate a directory hierarchy in object storage).

func (*ObjectStoreGRPCClient) ListObjects

func (c *ObjectStoreGRPCClient) ListObjects(bucket, prefix string) ([]string, error)

ListObjects gets a list of all objects in bucket that have the same prefix.

func (*ObjectStoreGRPCClient) PutObject

func (c *ObjectStoreGRPCClient) PutObject(bucket, key string, body io.Reader) error

PutObject creates a new object using the data in body within the specified object storage bucket with the given key.

type ObjectStoreGRPCServer

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

ObjectStoreGRPCServer implements the proto-generated ObjectStoreServer interface, and accepts gRPC calls and forwards them to an implementation of the pluggable interface.

func (*ObjectStoreGRPCServer) CreateSignedURL

CreateSignedURL creates a pre-signed URL for the given bucket and key that expires after ttl.

func (*ObjectStoreGRPCServer) DeleteObject

DeleteObject removes object with the specified key from the given bucket.

func (*ObjectStoreGRPCServer) GetObject

GetObject retrieves the object with the given key from the specified bucket in object storage.

func (*ObjectStoreGRPCServer) Init

Init prepares the ObjectStore for usage using the provided map of configuration key-value pairs. It returns an error if the ObjectStore cannot be initialized from the provided config.

func (*ObjectStoreGRPCServer) ListCommonPrefixes

ListCommonPrefixes gets a list of all object key prefixes that start with the specified prefix and stop at the next instance of the provided delimiter (this is often used to simulate a directory hierarchy in object storage).

func (*ObjectStoreGRPCServer) ListObjects

ListObjects gets a list of all objects in bucket that have the same prefix.

func (*ObjectStoreGRPCServer) PutObject

PutObject creates a new object using the data in body within the specified object storage bucket with the given key.

type ObjectStorePlugin

type ObjectStorePlugin struct {
	plugin.NetRPCUnsupportedPlugin
	// contains filtered or unexported fields
}

ObjectStorePlugin is an implementation of go-plugin's Plugin interface with support for gRPC for the cloudprovider/ObjectStore interface.

func NewObjectStorePlugin

func NewObjectStorePlugin(options ...pluginOption) *ObjectStorePlugin

NewObjectStorePlugin construct an ObjectStorePlugin.

func (*ObjectStorePlugin) GRPCClient

func (p *ObjectStorePlugin) GRPCClient(c *grpc.ClientConn) (interface{}, error)

GRPCClient returns an ObjectStore gRPC client.

func (*ObjectStorePlugin) GRPCServer

func (p *ObjectStorePlugin) GRPCServer(s *grpc.Server) error

GRPCServer registers an ObjectStore gRPC server.

type PluginIdentifier added in v0.10.0

type PluginIdentifier struct {
	Command string
	Kind    PluginKind
	Name    string
}

PluginIdenitifer uniquely identifies a plugin by command, kind, and name.

type PluginKind

type PluginKind string

PluginKind is a type alias for a string that describes the kind of a Velero-supported plugin.

const (
	// PluginKindObjectStore represents an object store plugin.
	PluginKindObjectStore PluginKind = "ObjectStore"

	// PluginKindBlockStore represents a block store plugin.
	PluginKindBlockStore PluginKind = "BlockStore"

	// PluginKindBackupItemAction represents a backup item action plugin.
	PluginKindBackupItemAction PluginKind = "BackupItemAction"

	// PluginKindRestoreItemAction represents a restore item action plugin.
	PluginKindRestoreItemAction PluginKind = "RestoreItemAction"

	// PluginKindPluginLister represents a plugin lister plugin.
	PluginKindPluginLister PluginKind = "PluginLister"
)

func (PluginKind) String

func (k PluginKind) String() string

String returns the string for k.

type PluginLister added in v0.10.0

type PluginLister interface {
	ListPlugins() ([]PluginIdentifier, error)
}

PluginLister lists plugins.

func NewPluginLister added in v0.10.0

func NewPluginLister(plugins ...PluginIdentifier) PluginLister

NewPluginLister returns a new PluginLister for plugins.

type PluginListerGRPCClient added in v0.10.0

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

PluginListerGRPCClient implements PluginLister and uses a gRPC client to make calls to the plugin server.

func (*PluginListerGRPCClient) ListPlugins added in v0.10.0

func (c *PluginListerGRPCClient) ListPlugins() ([]PluginIdentifier, error)

ListPlugins uses the gRPC client to request the list of plugins from the server. It translates the protobuf response to []PluginIdentifier.

type PluginListerGRPCServer added in v0.10.0

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

PluginListerGRPCServer implements the proto-generated PluginLister gRPC service interface. It accepts gRPC calls, forwards them to impl, and translates the responses to protobuf.

func (*PluginListerGRPCServer) ListPlugins added in v0.10.0

ListPlugins returns a list of registered plugins, delegating to s.impl to perform the listing.

type PluginListerPlugin added in v0.10.0

type PluginListerPlugin struct {
	plugin.NetRPCUnsupportedPlugin
	// contains filtered or unexported fields
}

PluginListerPlugin is a go-plugin Plugin for a PluginLister.

func NewPluginListerPlugin added in v0.10.0

func NewPluginListerPlugin(impl PluginLister) *PluginListerPlugin

NewPluginListerPlugin creates a new PluginListerPlugin with impl as the server-side implementation.

func (*PluginListerPlugin) GRPCClient added in v0.10.0

func (p *PluginListerPlugin) GRPCClient(c *grpc.ClientConn) (interface{}, error)

GRPCClient returns a PluginLister gRPC client.

func (*PluginListerPlugin) GRPCServer added in v0.10.0

func (p *PluginListerPlugin) GRPCServer(s *grpc.Server) error

GRPCServer registers a PluginLister gRPC server.

type Process added in v0.10.0

type Process interface {
	// contains filtered or unexported methods
}

type ProcessFactory added in v0.10.0

type ProcessFactory interface {
	// contains filtered or unexported methods
}

type ReceiveFunc

type ReceiveFunc func() ([]byte, error)

ReceiveFunc is a function that either returns a slice of an arbitrary number of bytes OR an error. Returning an io.EOF means there is no more data to be read; any other error is considered an actual error.

type Registry added in v0.10.0

type Registry interface {
	// DiscoverPlugins discovers all available plugins.
	DiscoverPlugins() error
	// List returns all PluginIdentifiers for kind.
	List(kind PluginKind) []PluginIdentifier
	// Get returns the PluginIdentifier for kind and name.
	Get(kind PluginKind, name string) (PluginIdentifier, error)
}

Registry manages information about available plugins.

func NewRegistry added in v0.10.0

func NewRegistry(dir string, logger logrus.FieldLogger, logLevel logrus.Level) Registry

NewRegistry returns a new registry.

type RestartableProcess added in v0.10.0

type RestartableProcess interface {
	// contains filtered or unexported methods
}

type RestartableProcessFactory added in v0.10.0

type RestartableProcessFactory interface {
	// contains filtered or unexported methods
}

type RestoreItemActionGRPCClient

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

RestoreItemActionGRPCClient implements the backup/ItemAction interface and uses a gRPC client to make calls to the plugin server.

func (*RestoreItemActionGRPCClient) AppliesTo

func (*RestoreItemActionGRPCClient) Execute

type RestoreItemActionGRPCServer

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

RestoreItemActionGRPCServer implements the proto-generated RestoreItemActionServer interface, and accepts gRPC calls and forwards them to an implementation of the pluggable interface.

func (*RestoreItemActionGRPCServer) AppliesTo

func (*RestoreItemActionGRPCServer) Execute

type RestoreItemActionPlugin

type RestoreItemActionPlugin struct {
	plugin.NetRPCUnsupportedPlugin
	// contains filtered or unexported fields
}

RestoreItemActionPlugin is an implementation of go-plugin's Plugin interface with support for gRPC for the restore/ItemAction interface.

func NewRestoreItemActionPlugin

func NewRestoreItemActionPlugin(options ...pluginOption) *RestoreItemActionPlugin

NewRestoreItemActionPlugin constructs a RestoreItemActionPlugin.

func (*RestoreItemActionPlugin) GRPCClient

func (p *RestoreItemActionPlugin) GRPCClient(c *grpc.ClientConn) (interface{}, error)

GRPCClient returns a RestoreItemAction gRPC client.

func (*RestoreItemActionPlugin) GRPCServer

func (p *RestoreItemActionPlugin) GRPCServer(s *grpc.Server) error

GRPCServer registers a RestoreItemAction gRPC server.

type Server added in v0.10.0

type Server interface {
	// RegisterBackupItemAction registers a backup item action.
	RegisterBackupItemAction(name string, initializer HandlerInitializer) Server

	// RegisterBackupItemActions registers multiple backup item actions.
	RegisterBackupItemActions(map[string]HandlerInitializer) Server

	// RegisterBlockStore registers a block store.
	RegisterBlockStore(name string, initializer HandlerInitializer) Server

	// RegisterBlockStores registers multiple block stores.
	RegisterBlockStores(map[string]HandlerInitializer) Server

	// RegisterObjectStore registers an object store.
	RegisterObjectStore(name string, initializer HandlerInitializer) Server

	// RegisterObjectStores registers multiple object stores.
	RegisterObjectStores(map[string]HandlerInitializer) Server

	// RegisterRestoreItemAction registers a restore item action.
	RegisterRestoreItemAction(name string, initializer HandlerInitializer) Server

	// RegisterRestoreItemActions registers multiple restore item actions.
	RegisterRestoreItemActions(map[string]HandlerInitializer) Server

	// Server runs the plugin server.
	Serve()
}

Server serves registered plugin implementations.

func NewServer added in v0.10.0

func NewServer(log logrus.FieldLogger) Server

NewServer returns a new Server

type StreamReadCloser

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

StreamReadCloser wraps a ReceiveFunc and a CloseSendFunc to implement io.ReadCloser.

func (*StreamReadCloser) Close

func (s *StreamReadCloser) Close() error

func (*StreamReadCloser) Read

func (s *StreamReadCloser) Read(p []byte) (n int, err error)

Directories

Path Synopsis
Package generated is a generated protocol buffer package.
Package generated is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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