template

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

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

Go to latest
Published: Apr 9, 2017 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxier

type Proxier struct {
	// contains filtered or unexported fields
}

Proxier is a HAProxy based proxy implementations. It will generate HAProxy configuration file via template and manage the HAProxy with a reload script.

func NewProxier

func NewProxier(cfg ProxierConfig) (*Proxier, error)

func (*Proxier) HandleEndpoints

func (proxier *Proxier) HandleEndpoints(eventType watch.EventType, endpoints *api.Endpoints) error

func (*Proxier) HandleService

func (proxier *Proxier) HandleService(eventType watch.EventType, service *api.Service) error

func (*Proxier) SetMaster

func (proxier *Proxier) SetMaster(master bool)

SetMaster indicates to the proxier whether in MASTER state or BACKUP state.

func (*Proxier) SetSkipCommit

func (proxier *Proxier) SetSkipCommit(skipCommit bool)

SetSkipCommit indicates to the proxier whether requests to commit/reload should be skipped.

type ProxierConfig

type ProxierConfig struct {
	Device           string
	KeepalivedConfig utilkeepalived.KeepalivedConfig
	HaproxyConfig    utilhaproxy.HaproxyConfig
}

ProxierConfig is just a wrapper of kinds of config that proxier needs to work properly.

Jump to

Keyboard shortcuts

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