Samze/brokerapi

A go package for the V2 CF Service Broker API

★ 0Forks 0GoGitHub ↗Compare

README

brokerapi

Build Status

A Go package for building V2 Cloud Foundry Service Brokers.

Dependencies

Usage

brokerapi defines a ServiceBroker interface. Pass an implementation of this to brokerapi.New, which returns an http.Handler that you can use to serve handle HTTP requests.

Alternatively, if you already have a *mux.Router that you want to attach service broker routes to, you can use brokerapi.AttachRoutes.

Error types

brokerapi defines a handful of error types in service_broker.go for some common error cases that your service broker may encounter. Return these from your ServiceBroker methods where appropriate, and brokerapi will do the "right thing" (™), and give Cloud Foundry an appropriate status code, as per the Service Broker API specification.

Example Service Broker

You can see the cf-redis service broker uses the BrokerAPI package to create a service broker for Redis.

Contributors

goonzoidiamralchst3vavadecraigfurmantinygrasshopperdprotasolwoydziakwilliammartinmariantallacwlbraapeterellisjoneszachgershalbertolealDanielCloudCredodrnicshinji62jmcarpSamzesiddhuwarriersimonjjones

Issues