Documentation ¶
Overview ¶
Package router is a GoLang library that interacts with CloudFoundry Go Router
Package router contains utilities to make call to the router API
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client that can be used to talk to a Cloud Controller's V2 Endpoints.
func (*Client) GetRouterGroupByName ¶
func (client *Client) GetRouterGroupByName(name string) (RouterGroup, error)
GetRouterGroupByName returns a list of RouterGroups.
func (*Client) GetRouterGroups ¶
func (client *Client) GetRouterGroups() ([]RouterGroup, error)
func (*Client) WrapConnection ¶
func (client *Client) WrapConnection(wrapper ConnectionWrapper)
WrapConnection wraps the current Client connection in the wrapper.
type Config ¶
type Config struct { // AppName is the name of the application/process using the client. AppName string // AppVersion is the version of the application/process using the client. AppVersion string // ConnectionConfig is the configuration for the client connection. ConnectionConfig // RoutingEndpoint is the url of the router API. RoutingEndpoint string // Wrappers that apply to the client connection. Wrappers []ConnectionWrapper }
Config allows the Client to be configured
type Connection ¶
Connection creates and executes http requests
type ConnectionConfig ¶
ConnectionConfig is for configuring the RouterConnection
type ConnectionWrapper ¶
type ConnectionWrapper interface { Connection Wrap(innerconnection Connection) Connection }
ConnectionWrapper can wrap a given connection allowing the wrapper to modify all requests going in and out of the given connection.
type Request ¶
Request represents the request of the router
func NewRequest ¶
func NewRequest(request *http.Request, body io.ReadSeeker) *Request
type Response ¶
type Response struct { // Result represents the resource entity type that is expected in the // response JSON. Result interface{} // RawResponse represents the response body. RawResponse []byte // HTTPResponse represents the HTTP response object. HTTPResponse *http.Response }
Response represents a Router response object.
type RouterConnection ¶
RouterConnection represents the connection to Router
func NewConnection ¶
func NewConnection(config ConnectionConfig) *RouterConnection
NewConnection returns a pointer to a new RouterConnection with the provided configuration
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
wrapperfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |