webServer

package
v0.0.0-...-2dc373f Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CfDeploymentName    string `env:"CF_DEPLOYMENT_NAME" envDefault:"cf-"`
	EtcdJobName         string `env:"ETCD_JOB_NAME" envDefault:"etcd_server"`
	SSLEnabled          bool   `env:"SSL_ENABLED" envDefault:"false"`
	SkipSSLVerification bool   `env:"SKIP_SSL_VERIFICATION" envDefault:"false"`
}

Config struct

type Controller

type Controller struct {
	BoshClient     *gogobosh.Client
	EtcdHTTPClient *http.Client
}

Controller struct

func CreateController

func CreateController(boshClient *gogobosh.Client, etcdHTTPClient *http.Client) *Controller

CreateController - returns a populated controller object

func (*Controller) CheckLeaders

func (c *Controller) CheckLeaders(w http.ResponseWriter, r *http.Request)

CheckLeaders - checks if leaders are in a healthy state

func (*Controller) LoadCerts

func (c *Controller) LoadCerts(deployconfig Config, deployment string) error

LoadCerts - downloads certs from BOSH and configures the EtcdHTTPClient appropriately

type Server

type Server struct {
	Controller *Controller
}

Server struct

func CreateServer

func CreateServer(boshClient *gogobosh.Client, etcdHTTPClient *http.Client) *Server

CreateServer - creates a server

func (*Server) Start

func (s *Server) Start() *mux.Router

Start - starts the web server

Jump to

Keyboard shortcuts

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