api

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HAProxyClient

type HAProxyClient interface {
	APIStartTransaction() error
	APICommitTransaction() error
	APIDisposeTransaction()
	BackendsGet() (models.Backends, error)
	BackendGet(backendName string) (models.Backend, error)
	BackendCreate(backend models.Backend) error
	BackendEdit(backend models.Backend) error
	BackendDelete(backendName string) error
	BackendHTTPRequestRuleCreate(backend string, rule models.HTTPRequestRule) error
	BackendHTTPRequestRuleDeleteAll(backend string)
	BackendServerCreate(backendName string, data models.Server) error
	BackendServerEdit(backendName string, data models.Server) error
	BackendServerDelete(backendName string, serverName string) error
	BackendSwitchingRuleCreate(frontend string, rule models.BackendSwitchingRule) error
	BackendSwitchingRuleDeleteAll(frontend string)
	ExecuteRaw(command string) (result []string, err error)
	EnabledConfig(configType string) (enabled bool, err error)
	FrontendCreate(frontend models.Frontend) error
	FrontendDelete(frontendName string) error
	FrontendsGet() (models.Frontends, error)
	FrontendGet(frontendName string) (models.Frontend, error)
	FrontendEdit(frontend models.Frontend) error
	FrontendBindsGet(frontend string) (models.Binds, error)
	FrontendBindCreate(frontend string, bind models.Bind) error
	FrontendBindEdit(frontend string, bind models.Bind) error
	FrontendHTTPRequestRuleDeleteAll(frontend string)
	FrontendHTTPResponseRuleDeleteAll(frontend string)
	FrontendHTTPRequestRuleCreate(frontend string, rule models.HTTPRequestRule) error
	FrontendHTTPResponseRuleCreate(frontend string, rule models.HTTPResponseRule) error
	FrontendTCPRequestRuleDeleteAll(frontend string)
	FrontendTCPRequestRuleCreate(frontend string, rule models.TCPRequestRule) error
	SetDaemonMode(enabled *bool) error
	SetDefaulLogFormat(value *string) error
	SetDefaulMaxconn(value *int64) error
	SetDefaulOption(option string, enabled *bool) error
	SetDefaulTimeout(timeout string, value *string) error
	SetLogTarget(log *types.Log, index int) error
	SetNbthread(value *int64) error
	SetServerAddr(backendName string, serverName string, ip string, port int) error
	SetServerState(backendName string, serverName string, state string) error
}

func Init

func Init(configFile, programPath, runtimeSocket string) (client HAProxyClient, err error)

Jump to

Keyboard shortcuts

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