broker

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker struct {

	// Synchronize go routines.
	sync.RWMutex
	// contains filtered or unexported fields
}

Broker provides an implementation of broker.Interface

func NewBroker

func NewBroker(mb MinibrokerClient, defaultNamespace string, provisioningSettings *ProvisioningSettings) *Broker

NewBroker creates a Broker instance with the given dependencies.

func NewBrokerFromOptions added in v1.0.0

func NewBrokerFromOptions(o Options) (*Broker, error)

NewBrokerFromOptions is a hook that is called with the Options the program is run with. NewBroker is the place where you will initialize your Broker the parameters passed in.

func (*Broker) Bind

func (b *Broker) Bind(request *osb.BindRequest, _ *broker.RequestContext) (*broker.BindResponse, error)

func (*Broker) BindingLastOperation added in v1.0.0

func (*Broker) Deprovision

func (*Broker) GetBinding added in v1.0.0

func (*Broker) GetCatalog

func (b *Broker) GetCatalog(c *broker.RequestContext) (*broker.CatalogResponse, error)

func (*Broker) LastOperation

LastOperation provides information on the state of the last asynchronous operation

func (*Broker) Provision

func (*Broker) Unbind

func (*Broker) Update

func (*Broker) ValidateBrokerAPIVersion

func (b *Broker) ValidateBrokerAPIVersion(version string) error

type MinibrokerClient added in v1.0.0

type MinibrokerClient interface {
	Init(repoURL string) error
	ListServices() ([]osb.Service, error)
	Provision(instanceID, serviceID, planID, namespace string, acceptsIncomplete bool, provisionParams *minibroker.ProvisionParams) (string, error)
	Bind(instanceID, serviceID, bindingID string, acceptsIncomplete bool, bindParams *minibroker.BindParams) (string, error)
	Unbind(instanceID, bindingID string) error
	GetBinding(instanceID, bindingID string) (*osb.GetBindingResponse, error)
	Deprovision(instanceID string, acceptsIncomplete bool) (string, error)
	LastOperationState(instanceID string, operationKey *osb.OperationKey) (*osb.LastOperationResponse, error)
	LastBindingOperationState(instanceID, bindingID string) (*osb.LastOperationResponse, error)
}

MinibrokerClient defines the interface of the client the broker operates on.

type Options

type Options struct {
	HelmRepoURL string
	CatalogPath string
	// The namespace where Minibroker stores configmaps.
	ConfigNamespace string
	// The default namespace wheer Minibroker deploys service instances.
	DefaultNamespace          string
	ServiceCatalogEnabledOnly bool
	// The YAML file where the optional default chart values are stored.
	ProvisioningSettingsPath string
	// The k8s cluster domain. If not set via the CLI flags, Minibroker tries to
	// infer from the /etc/resolv.conf.
	ClusterDomain string
}

type ProvisioningSettings added in v1.0.0

type ProvisioningSettings struct {
	Mariadb    *ServiceProvisioningSettings `yaml:"mariadb"`
	Mongodb    *ServiceProvisioningSettings `yaml:"mongodb"`
	Mysql      *ServiceProvisioningSettings `yaml:"mysql"`
	Postgresql *ServiceProvisioningSettings `yaml:"postgresql"`
	Rabbitmq   *ServiceProvisioningSettings `yaml:"rabbitmq"`
	Redis      *ServiceProvisioningSettings `yaml:"redis"`
}

ProvisioningSettings represents the configuration regarding the provisioning of services.

func (*ProvisioningSettings) ForService added in v1.0.0

func (d *ProvisioningSettings) ForService(service string) (*ServiceProvisioningSettings, bool)

ForService returns the parameters for the given service.

func (*ProvisioningSettings) LoadYaml added in v1.0.0

func (d *ProvisioningSettings) LoadYaml(data []byte) error

LoadYaml parses param definitions from raw yaml.

type ServiceProvisioningSettings added in v1.0.0

type ServiceProvisioningSettings struct {
	OverrideParams map[string]interface{} `yaml:"overrideParams"`
}

ServiceProvisioningSettings represents provisioning settings for a specific service.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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