helpers

package
v0.0.0-...-d14e9f7 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_BBS_API_URL     = "http://bbs.service.cf.internal:8889"
	DEFAULT_ROUTING_API_URL = "http://routing-api.service.cf.internal:3000"
)
View Source
const (
	DefaultRouterGroupGuid = "bad25cff-9332-48a6-8603-b619858e7992"
)

Variables

This section is empty.

Functions

func CreateDesiredLRP

func CreateDesiredLRP(
	logger lager.Logger, containerPorts []uint32,
	routes tcp_routes.TCPRoutes, serverId string,
	instances int) *models.DesiredLRP

func GetBbsClient

func GetBbsClient(routerApiConfig RouterApiConfig) (bbs.Client, error)

func RandomName

func RandomName() string

func UpdateDesiredLRP

func UpdateDesiredLRP(
	externalPort, containerPort uint32,
	instances int) *models.DesiredLRPUpdate

Types

type OAuthConfig

type OAuthConfig struct {
	TokenEndpoint string `json:"token_endpoint"`
	ClientName    string `json:"client_name"`
	ClientSecret  string `json:"client_secret"`
	Port          int    `json:"port"`
}

type RouterApiConfig

type RouterApiConfig struct {
	Addresses         []string     `json:"addresses"`
	ElbAddress        string       `json:"elb_address"`
	Port              uint16       `json:"port"`
	BBSAddress        string       `json:"bbs_api_url,omitempty"`
	BBSClientCertFile string       `json:"bbs_client_cert,omitempty"`
	BBSClientKeyFile  string       `json:"bbs_client_key,omitempty"`
	BBSCACertFile     string       `json:"bbs_ca_cert,omitempty"`
	BBSRequireSSL     bool         `json:"bbs_require_ssl"`
	RoutingApiUrl     string       `json:"routing_api_url"`
	SystemDomain      string       `json:"system_domain"`
	UseHttp           bool         `json:"use_http"`
	OAuth             *OAuthConfig `json:"oauth"`
}

func LoadConfig

func LoadConfig() RouterApiConfig

func (RouterApiConfig) Protocol

func (c RouterApiConfig) Protocol() string

Jump to

Keyboard shortcuts

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