Documentation ¶
Index ¶
Constants ¶
This section is empty.
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 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 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) RefreshBackends() (deleted []string, err error) SetMapContent(mapFile string, payload []string) error SetServerAddr(backendName string, serverName string, ip string, port int) error SetServerState(backendName string, serverName string, state string) 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.