net

package
v0.0.0-...-74183db Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCloudClient

func CreateCloudClient() ([]*http.Client, error)

CreateCloudClient creates a http client to access Service Registries running in the cloud (specifically Cloud Foundry).

The environment variables 'VCAP_SERVICES' provides a JSON that contains an entry with the key 'p-service-registry'. This entry and used to build an OAuth2 client.

func CreateCloudClientForService

func CreateCloudClientForService(name string) ([]*http.Client, error)

CreateCloudClientForService creates a ConfigClient to access Service Registries running in the cloud (specifically Cloud Foundry).

The environment variables 'VCAP_SERVICES' provides a JSON. The JSON should contain the entry matching the specified name. This entry and used to build an OAuth2 client.

func CreateOAuth2Client

func CreateOAuth2Client(creds []cfservices.Credentials) ([]*http.Client, error)

CreateOAuth2Client creates a http client to access Service Registries from an array of credentials.

func FindFirstNonLoopBackIPAddress

func FindFirstNonLoopBackIPAddress() (net.IP, error)

func GetCloudCredentials

func GetCloudCredentials(name string) (*cfservices.ServiceCredentials, error)

GetCloudCredentials retrieves the Service Registry's credentials so an OAuth2 client can be created.

Types

This section is empty.

Jump to

Keyboard shortcuts

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