lb

package
v0.0.0-...-0e73642 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AclUser

type AclUser struct {
	Group    string
	Name     string
	Password string
}

type BufferNewLine

type BufferNewLine struct {
	bytes.Buffer
}

func (*BufferNewLine) WriteNewLine

func (b *BufferNewLine) WriteNewLine(str string) (n int, err error)

type ComputedAcl

type ComputedAcl struct {
	Name   string
	Groups []string
	Users  []AclUser
}

type ComputedBackend

type ComputedBackend struct {
	Name    string
	Mode    string
	Lines   []string
	Servers []ComputedServer
}

type ComputedFrontend

type ComputedFrontend struct {
	Name     string
	Lines    []string
	Backends []ComputedBackend
}

type ComputedHaproxyConfig

type ComputedHaproxyConfig struct {
	Frontends []ComputedFrontend
	Acls      []ComputedAcl
	Stats     Stats
}

type ComputedServer

type ComputedServer struct {
	Mode  string
	Lines []string
}

type CustomCert

type CustomCert struct {
	Domains []string
	Pem     string
}

type DumpResponse

type DumpResponse struct {
	YamlConfig    string
	HaproxyConfig string
}

type HaproxyConfig

type HaproxyConfig struct {
	Frontends          []hatypes.Frontend
	Letsencryptaddress string
	CustomCerts        []CustomCert
}

type HaproxyLb

type HaproxyLb struct {
	LeContents []byte

	Options Options
	// contains filtered or unexported fields
}

func NewHaproxyLb

func NewHaproxyLb(leContents []byte, o Options) (*HaproxyLb, error)

func (*HaproxyLb) AddBackend

func (h *HaproxyLb) AddBackend(options types.BackendAddOptions) error

func (*HaproxyLb) AddFrontend

func (h *HaproxyLb) AddFrontend(options types.FrontendAddOptions) error

func (*HaproxyLb) DeleteBackend

func (h *HaproxyLb) DeleteBackend(options types.BackendDeleteOptions) error

func (*HaproxyLb) DeleteFrontend

func (h *HaproxyLb) DeleteFrontend(options types.FrontendDeleteOptions) error

func (*HaproxyLb) Dump

func (h *HaproxyLb) Dump() (dumpResponse DumpResponse, err error)

func (*HaproxyLb) GetFrontend

func (h *HaproxyLb) GetFrontend(name string) (hatypes.Frontend, error)

func (*HaproxyLb) GetFrontends

func (h *HaproxyLb) GetFrontends() []hatypes.Frontend

type LoadBalancer

type LoadBalancer interface {
	AddFrontend(options types.FrontendAddOptions) error
	AddBackend(options types.BackendAddOptions) error
	Dump() (string, error)
}

type Options

type Options struct {
	Stats Stats
}

type Stats

type Stats struct {
	User     string
	Password string
	Port     int
}

Jump to

Keyboard shortcuts

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