Documentation ¶
Overview ¶
Package bridge holds the code that users of the skeleton write for their broker. To make a broker, fill out:
- The Options type, which holds options for the broker
- The AddFlags function, which adds CLI flags for an Options
- The methods of the BusinessLogic type, which implements the broker's business logic
- The NewBusinessLogic function, which creates a BusinessLogic from the Options the program is run with
Index ¶
- func AddFlags(o *Options)
- func NewProvReqParams(params map[string]interface{}) *provReqParams
- type BusinessLogic
- func (b *BusinessLogic) Bind(request *osb.BindRequest, c *osblib.RequestContext) (*osblib.BindResponse, error)
- func (b *BusinessLogic) Deprovision(request *osb.DeprovisionRequest, c *osblib.RequestContext) (*osblib.DeprovisionResponse, error)
- func (b *BusinessLogic) GetCatalog(c *osblib.RequestContext) (*osblib.CatalogResponse, error)
- func (b *BusinessLogic) LastOperation(request *osb.LastOperationRequest, c *osblib.RequestContext) (*osblib.LastOperationResponse, error)
- func (b *BusinessLogic) Provision(request *osb.ProvisionRequest, c *osblib.RequestContext) (*osblib.ProvisionResponse, error)
- func (b *BusinessLogic) Unbind(request *osb.UnbindRequest, c *osblib.RequestContext) (*osblib.UnbindResponse, error)
- func (b *BusinessLogic) Update(request *osb.UpdateInstanceRequest, c *osblib.RequestContext) (*osblib.UpdateInstanceResponse, error)
- func (b *BusinessLogic) ValidateBrokerAPIVersion(version string) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFlags ¶
func AddFlags(o *Options)
AddFlags is a hook called to initialize the CLI flags for broker options. It is called after the flags are added for the skeleton and before flag parse is called.
func NewProvReqParams ¶
func NewProvReqParams(params map[string]interface{}) *provReqParams
NewProvReqParams encapsulates the parameter processing for incoming provision requests
Types ¶
type BusinessLogic ¶
type BusinessLogic struct { // Synchronize go routines. sync.RWMutex PGO_OSB_GUID string PGO_APISERVER_URL string PGO_APISERVER_VERSION string PGO_USERNAME string PGO_PASSWORD string Broker broker.Executor // contains filtered or unexported fields }
BusinessLogic provides an implementation of the osblib.BusinessLogic interface.
func NewBusinessLogic ¶
func NewBusinessLogic(o Options) (*BusinessLogic, error)
NewBusinessLogic is a hook that is called with the Options the program is run with. NewBusinessLogic is the place where you will initialize your BusinessLogic the parameters passed in.
func (*BusinessLogic) Bind ¶
func (b *BusinessLogic) Bind(request *osb.BindRequest, c *osblib.RequestContext) (*osblib.BindResponse, error)
func (*BusinessLogic) Deprovision ¶
func (b *BusinessLogic) Deprovision(request *osb.DeprovisionRequest, c *osblib.RequestContext) (*osblib.DeprovisionResponse, error)
func (*BusinessLogic) GetCatalog ¶
func (b *BusinessLogic) GetCatalog(c *osblib.RequestContext) (*osblib.CatalogResponse, error)
func (*BusinessLogic) LastOperation ¶
func (b *BusinessLogic) LastOperation(request *osb.LastOperationRequest, c *osblib.RequestContext) (*osblib.LastOperationResponse, error)
func (*BusinessLogic) Provision ¶
func (b *BusinessLogic) Provision(request *osb.ProvisionRequest, c *osblib.RequestContext) (*osblib.ProvisionResponse, error)
func (*BusinessLogic) Unbind ¶
func (b *BusinessLogic) Unbind(request *osb.UnbindRequest, c *osblib.RequestContext) (*osblib.UnbindResponse, error)
func (*BusinessLogic) Update ¶
func (b *BusinessLogic) Update(request *osb.UpdateInstanceRequest, c *osblib.RequestContext) (*osblib.UpdateInstanceResponse, error)
func (*BusinessLogic) ValidateBrokerAPIVersion ¶
func (b *BusinessLogic) ValidateBrokerAPIVersion(version string) error
type Options ¶
type Options struct { CatalogPath string PGO_OSB_GUID string PGO_USERNAME string PGO_PASSWORD string PGO_APISERVER_URL string PGO_APISERVER_VERSION string Async bool // Unflagged configs Simulated bool KubeAPIClient *rest.RESTClient }
Options holds the options specified by the broker's code on the command line. Users should add their own options here and add flags for them in AddFlags.