api

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: Apache-2.0 Imports: 11 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
	BackendCfgSnippetSet(backendName string, value *[]string) error
	BackendHTTPRequestRuleCreate(backend string, rule models.HTTPRequestRule) error
	BackendRuleDeleteAll(backend string)
	BackendServerDeleteAll(backendName string) (deleteServers bool)
	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)
	FrontendCfgSnippetSet(frontendName string, value *[]string) 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
	FrontendEnableSSLOffload(frontendName string, certDir string, alpn bool) (err error)
	FrontendDisableSSLOffload(frontendName string) (err error)
	FrontendBindsGet(frontend string) (models.Binds, error)
	FrontendBindCreate(frontend string, bind models.Bind) error
	FrontendBindEdit(frontend string, bind models.Bind) error
	FrontendHTTPRequestRuleCreate(frontend string, rule models.HTTPRequestRule, ingressACL string) error
	FrontendHTTPResponseRuleCreate(frontend string, rule models.HTTPResponseRule, ingressACL string) error
	FrontendTCPRequestRuleCreate(frontend string, rule models.TCPRequestRule, ingressACL string) error
	FrontendRuleDeleteAll(frontend string)
	GlobalConfigEnabled(section string, config string) (enabled bool, err error)
	GlobalWriteConfig(section string, config string) (result string, err error)
	DaemonMode(value *types.Enabled) error
	DefaultErrorFile(value *types.ErrorFile, index int) error
	DefaultLogFormat(value *types.StringC) error
	GlobalMaxconn(value *types.Int64C) error
	DefaultOption(option string, value *types.SimpleOption) error
	DefaultTimeout(timeout string, value *types.SimpleTimeout) error
	GlobalCfgSnippet(snippet *types.StringSliceC) error
	GlobalHardStopAfter(value *types.StringC) error
	LogTarget(value *types.Log, index int) error
	Nbthread(value *types.Int64C) error
	PIDFile(value *types.StringC) error
	RuntimeSocket(value *types.Socket) error
	GetMap(mapFile string) (*models.Map, error)
	SetMapContent(mapFile string, payload string) error
	ServerStateBase(value *types.StringC) error
	SetServerAddr(backendName string, serverName string, ip string, port int) error
	SetServerState(backendName string, serverName string, state string) error
	SyncBackendSrvs(oldEndpoints, newEndpoints *store.PortEndpoints) error
	UserListDeleteByGroup(group string) error
	UserListCreateByGroup(group string, userPasswordMap map[string][]byte) error
}

func Init

func Init(transactionDir, 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