csibroker

package
v0.0.0-...-edc587e Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2018 License: Apache-2.0 Imports: 18 Imported by: 4

Documentation

Index

Constants

View Source
const (
	PermissionVolumeMount = brokerapi.RequiredPermission("volume_mount")
	DefaultContainerPath  = "/var/vcap/data"
)

Variables

View Source
var ErrEmptySpecFile = errors.New("At least one service must be provided in specfile")

Functions

This section is empty.

Types

type Broker

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

func New

func New(
	logger lager.Logger,
	os osshim.Os,
	clock clock.Clock,
	store brokerstore.Store,
	servicesRegistry ServicesRegistry,
) (*Broker, error)

func (*Broker) Bind

func (b *Broker) Bind(context context.Context, instanceID string, bindingID string, bindDetails brokerapi.BindDetails) (_ brokerapi.Binding, e error)

func (*Broker) Deprovision

func (b *Broker) Deprovision(context context.Context, instanceID string, details brokerapi.DeprovisionDetails, asyncAllowed bool) (_ brokerapi.DeprovisionServiceSpec, e error)

func (*Broker) LastOperation

func (b *Broker) LastOperation(_ context.Context, instanceID string, operationData string) (brokerapi.LastOperation, error)

func (*Broker) Provision

func (b *Broker) Provision(context context.Context, instanceID string, details brokerapi.ProvisionDetails, asyncAllowed bool) (_ brokerapi.ProvisionedServiceSpec, e error)

func (*Broker) Services

func (b *Broker) Services(_ context.Context) []brokerapi.Service

func (*Broker) Unbind

func (b *Broker) Unbind(context context.Context, instanceID string, bindingID string, details brokerapi.UnbindDetails) (e error)

func (*Broker) Update

func (b *Broker) Update(context context.Context, instanceID string, details brokerapi.UpdateDetails, asyncAllowed bool) (brokerapi.UpdateServiceSpec, error)

type ErrInvalidService

type ErrInvalidService struct {
	Index int
}

func (ErrInvalidService) Error

func (e ErrInvalidService) Error() string

type ErrInvalidSpecFile

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

func (ErrInvalidSpecFile) Error

func (e ErrInvalidSpecFile) Error() string

type ErrServiceNotFound

type ErrServiceNotFound struct {
	ID string
}

func (ErrServiceNotFound) Error

func (e ErrServiceNotFound) Error() string

type NoopControllerClient

type NoopControllerClient struct{}

func (*NoopControllerClient) ControllerGetCapabilities

func (*NoopControllerClient) ControllerPublishVolume

func (*NoopControllerClient) ControllerUnpublishVolume

func (*NoopControllerClient) CreateSnapshot

func (*NoopControllerClient) CreateVolume

func (*NoopControllerClient) DeleteSnapshot

func (*NoopControllerClient) DeleteVolume

func (*NoopControllerClient) GetCapacity

func (*NoopControllerClient) ListSnapshots

func (*NoopControllerClient) ListVolumes

type NoopIdentityClient

type NoopIdentityClient struct{}

func (*NoopIdentityClient) GetPluginCapabilities

func (*NoopIdentityClient) GetPluginInfo

func (*NoopIdentityClient) Probe

type Service

type Service struct {
	DriverName string `json:"driver_name"`
	ConnAddr   string `json:"connection_address"`

	brokerapi.Service
}

type ServiceFingerPrint

type ServiceFingerPrint struct {
	Name   string
	Volume *csi.Volume
}

type ServicesRegistry

type ServicesRegistry interface {
	IdentityClient(serviceID string) (csi.IdentityClient, error)
	ControllerClient(serviceID string) (csi.ControllerClient, error)
	BrokerServices() []brokerapi.Service
	DriverName(serviceID string) (string, error)
}

func NewServicesRegistry

func NewServicesRegistry(
	csiShim csishim.Csi,
	grpcShim grpcshim.Grpc,
	serviceSpecPath string,
	logger lager.Logger,
) (ServicesRegistry, error)

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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