broker

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPort     = "3000"
	DefaultLogLevel = "debug"
)

Variables

This section is empty.

Functions

func NewAPI

func NewAPI(broker brokerapi.ServiceBroker, logger lager.Logger, config Config) http.Handler

Types

type API

type API struct {
	BasicAuthUsername string `json:"basic_auth_username"`
	BasicAuthPassword string `json:"basic_auth_password"`
	Port              string `json:"port"`
	LogLevel          string `json:"log_level"`
	LagerLogLevel     lager.LogLevel
}

func (API) ConvertLogLevel

func (api API) ConvertLogLevel() (lager.LogLevel, error)

type Broker

type Broker struct {
	Provider provider.ServiceProvider
	// contains filtered or unexported fields
}

func New

func New(config Config, serviceProvider provider.ServiceProvider, logger lager.Logger) *Broker

func (*Broker) Bind

func (b *Broker) Bind(
	ctx context.Context,
	instanceID, bindingID string,
	details brokerapi.BindDetails,
	asyncAllowed bool,
) (brokerapi.Binding, error)

func (*Broker) Deprovision

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

func (*Broker) GetBinding added in v0.24.0

func (b *Broker) GetBinding(ctx context.Context, first, second string) (brokerapi.GetBindingSpec, error)

func (*Broker) GetInstance added in v0.24.0

func (b *Broker) GetInstance(ctx context.Context, first string) (brokerapi.GetInstanceDetailsSpec, error)

func (*Broker) LastBindingOperation added in v0.24.0

func (b *Broker) LastBindingOperation(ctx context.Context, first, second string, pollDetails brokerapi.PollDetails) (brokerapi.LastOperation, error)

func (*Broker) LastOperation

func (b *Broker) LastOperation(
	ctx context.Context,
	instanceID string,
	pollDetails brokerapi.PollDetails,
) (brokerapi.LastOperation, error)

func (*Broker) Provision

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

func (*Broker) Services

func (b *Broker) Services(ctx context.Context) ([]brokerapi.Service, error)

func (*Broker) Unbind

func (b *Broker) Unbind(
	ctx context.Context,
	instanceID, bindingID string,
	details brokerapi.UnbindDetails,
	asyncAllowed bool,
) (brokerapi.UnbindSpec, error)

func (*Broker) Update

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

type Catalog

type Catalog struct {
	Catalog brokerapi.CatalogResponse `json:"catalog"`
}

type Config

type Config struct {
	API      API
	Catalog  Catalog
	Provider []byte
}

func NewConfig

func NewConfig(source io.Reader) (Config, error)

func (Config) Validate

func (c Config) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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