Documentation ¶
Index ¶
Constants ¶
View Source
const BufferSize = 16000
BufferSize is the default value of HAproxy tune.bufsize. Not recommended to change it Map payload or socket data cannot be bigger than tune.bufsize
Variables ¶
View Source
var ErrMapNotFound = fmt.Errorf("map not found")
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 BackendCreatePermanently(backend models.Backend) error BackendCreateIfNotExist(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 BackendServersGet(backendName string) (models.Servers, error) BackendSwitchingRuleCreate(frontend string, rule models.BackendSwitchingRule) error BackendSwitchingRuleDeleteAll(frontend string) error DefaultsGetConfiguration() (*models.Defaults, error) DefaultsPushConfiguration(models.Defaults) error 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 string, strictSNI bool) (err error) FrontendDisableSSLOffload(frontendName string) (err error) FrontendSSLOffloadEnabled(frontendName string) bool FrontendBindsGet(frontend string) (models.Binds, error) FrontendBindCreate(frontend string, bind models.Bind) error FrontendBindEdit(frontend string, bind models.Bind) error FrontendBindDelete(frontend string, bind string) 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) GlobalGetLogTargets() (models.LogTargets, error) GlobalPushLogTargets(models.LogTargets) error GlobalGetConfiguration() (*models.Global, error) GlobalPushConfiguration(models.Global) error GlobalCfgSnippet(snippet []string) error GetMap(mapFile string) (*models.Map, error) PeerEntryEdit(peerSection string, peer models.PeerEntry) error RefreshBackends() (deleted []string, err error) SetMapContent(mapFile string, payload []string) error SetServerAddrAndState([]RuntimeServerData) error ServerGet(serverName, backendNa string) (models.Server, error) SetAuxCfgFile(auxCfgFile string) SyncBackendSrvs(backend *store.RuntimeBackend, portUpdated bool) error UserListDeleteAll() error UserListExistsByGroup(group string) (bool, error) UserListCreateByGroup(group string, userPasswordMap map[string][]byte) error }
func New ¶
func New(transactionDir, configFile, programPath, runtimeSocket string) (client HAProxyClient, err error)
Click to show internal directories.
Click to hide internal directories.