Documentation ¶
Index ¶
- func ValidateBindRequest(breq *api.BindRequest) field.ErrorList
- func ValidateProvisionRequest(preq *api.ProvisionRequest) field.ErrorList
- type Broker
- func (b *Broker) Bind(instanceID, bindingID string, breq *api.BindRequest) *api.Response
- func (b *Broker) Catalog() *api.Response
- func (b *Broker) Deprovision(instanceID string) *api.Response
- func (b *Broker) LastOperation(instanceID string, operation api.Operation) *api.Response
- func (b *Broker) Provision(instanceID string, preq *api.ProvisionRequest) *api.Response
- func (b *Broker) Unbind(instanceID, bindingID string) *api.Response
- func (b *Broker) WaitForReady() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateBindRequest ¶
func ValidateBindRequest(breq *api.BindRequest) field.ErrorList
ValidateBindRequest ensures that a BindRequest is valid, beyond the validation carried out by the service broker framework itself.
func ValidateProvisionRequest ¶
func ValidateProvisionRequest(preq *api.ProvisionRequest) field.ErrorList
ValidateProvisionRequest ensures that a ProvisionRequest is valid, beyond the validation carried out by the service broker framework itself.
Types ¶
type Broker ¶
type Broker struct {
// contains filtered or unexported fields
}
Broker represents the template service broker. It implements openservicebroker/api.Broker.
func NewBroker ¶
func NewBroker(privrestconfig restclient.Config, privkc kclientset.Interface, infraNamespace string, informer templateinformer.TemplateInformer, namespaces []string) *Broker
NewBroker returns a new instance of the template service broker. While built into origin, its initialisation is asynchronous. This is because it is part of the API server, but requires the API server to be up to get its service account token.
func (*Broker) Catalog ¶
Catalog returns our service catalog (one service per OpenShift template in configured namespace(s)).
func (*Broker) Deprovision ¶
Deprovision is the reverse of Provision. We clean up the TemplateInstance, Secret and BrokerTemplateInstance objects (in that order); the garbage collector is responsible for the removal of the objects provisioned by the Template(Instance) itself.
func (*Broker) LastOperation ¶
LastOperation returns the status of an asynchronous operation. Currently the OSB API only supports async Provision and Deprovision; we don't currently support async Deprovision as the garbage collector doesn't indicate when it's done cleaning up after a given object is removed.
func (*Broker) Provision ¶
Provision instantiates a template from a ProvisionRequest, via the OpenShift TemplateInstance API.
func (*Broker) Unbind ¶
Unbind is the reverse of Bind. Currently it simply removes the binding ID from the BrokerTemplateInstance, if found.
func (*Broker) WaitForReady ¶
WaitForReady is called on each incoming API request via a server filter. It is intended to be a quick check that the broker is initialized (which should itself be a fast one-off start-up event).