etcd-leader-monitor: Index | Files

package webServer

import ""


Package Files

controller.go server.go

type Config Uses

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 Uses

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

Controller struct

func CreateController Uses

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

CreateController - returns a populated controller object

func (*Controller) CheckLeaders Uses

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

CheckLeaders - checks if leaders are in a healthy state

func (*Controller) LoadCerts Uses

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

LoadCerts - downloads certs from BOSH and configures the EtcdHTTPClient appropriately

type Server Uses

type Server struct {
    Controller *Controller

Server struct

func CreateServer Uses

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

CreateServer - creates a server

func (*Server) Start Uses

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

Start - starts the web server

Package webServer imports 9 packages (graph) and is imported by 1 packages. Updated 2017-05-09. Refresh now. Tools for package owners.