Documentation
¶
Index ¶
- type HAProxyClient
- func (c *HAProxyClient) BindGoService(backendName string, targetService services.ServiceConfig) error
- func (c *HAProxyClient) BindService(backendName, serviceName, serviceAddress string, servicePort int) error
- func (c *HAProxyClient) DeleteAllServersFromBackend(backendName string) error
- func (c *HAProxyClient) DeleteServer(backendName, serverName string) error
- func (c *HAProxyClient) ReplaceGoStub(backendName string, serviceProcess *services.ServiceProcess) error
- type HAProxyConfigurationManager
- func (c *HAProxyConfigurationManager) AddServer(backendName string, serverData map[string]interface{}, transactionID string) error
- func (c *HAProxyConfigurationManager) CommitTransaction(transactionID string) error
- func (c *HAProxyConfigurationManager) CreateBackend(backendName, transactionID string) error
- func (c *HAProxyConfigurationManager) DeleteServer(backendName, serverName, transactionID string) error
- func (c *HAProxyConfigurationManager) GetCurrentConfigVersion() (int64, error)
- func (c *HAProxyConfigurationManager) GetServersFromBackend(backendName, transactionID string) ([]HAProxyServer, error)
- func (c *HAProxyConfigurationManager) RollbackTransaction(transactionID string) error
- func (c *HAProxyConfigurationManager) StartTransaction(version int64) (string, error)
- type HAProxyServer
- type TransactionMiddleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HAProxyClient ¶
type HAProxyClient struct {
// contains filtered or unexported fields
}
HAProxyClient provides a high-level interface for managing the HAProxy configuration.
func NewHAProxyClient ¶
func NewHAProxyClient() *HAProxyClient
NewHAProxyClient creates a new instance of HAProxyClient.
func (*HAProxyClient) BindGoService ¶
func (c *HAProxyClient) BindGoService(backendName string, targetService services.ServiceConfig) error
func (*HAProxyClient) BindService ¶
func (c *HAProxyClient) BindService(backendName, serviceName, serviceAddress string, servicePort int) error
func (*HAProxyClient) DeleteAllServersFromBackend ¶
func (c *HAProxyClient) DeleteAllServersFromBackend(backendName string) error
func (*HAProxyClient) DeleteServer ¶
func (c *HAProxyClient) DeleteServer(backendName, serverName string) error
func (*HAProxyClient) ReplaceGoStub ¶
func (c *HAProxyClient) ReplaceGoStub(backendName string, serviceProcess *services.ServiceProcess) error
type HAProxyConfigurationManager ¶
type HAProxyConfigurationManager struct {
// contains filtered or unexported fields
}
HAProxyConfigurationManager provides low-level functions for managing the HAProxy configuration.
func NewHAProxyConfigurationManager ¶
func NewHAProxyConfigurationManager(apiURL, username, password string) *HAProxyConfigurationManager
NewHAProxyConfigurationManager creates a new instance of HAProxyConfigurationManager.
func (*HAProxyConfigurationManager) AddServer ¶
func (c *HAProxyConfigurationManager) AddServer(backendName string, serverData map[string]interface{}, transactionID string) error
AddServer adds a new server to the specified backend in the HAProxy configuration.
func (*HAProxyConfigurationManager) CommitTransaction ¶
func (c *HAProxyConfigurationManager) CommitTransaction(transactionID string) error
CommitTransaction commits the specified HAProxy configuration transaction.
func (*HAProxyConfigurationManager) CreateBackend ¶
func (c *HAProxyConfigurationManager) CreateBackend(backendName, transactionID string) error
CreateBackend creates a new backend in the HAProxy configuration.
func (*HAProxyConfigurationManager) DeleteServer ¶
func (c *HAProxyConfigurationManager) DeleteServer(backendName, serverName, transactionID string) error
func (*HAProxyConfigurationManager) GetCurrentConfigVersion ¶
func (c *HAProxyConfigurationManager) GetCurrentConfigVersion() (int64, error)
GetCurrentConfigVersion retrieves the current HAProxy configuration version as an integer.
func (*HAProxyConfigurationManager) GetServersFromBackend ¶
func (c *HAProxyConfigurationManager) GetServersFromBackend(backendName, transactionID string) ([]HAProxyServer, error)
func (*HAProxyConfigurationManager) RollbackTransaction ¶
func (c *HAProxyConfigurationManager) RollbackTransaction(transactionID string) error
RollbackTransaction rolls back the specified HAProxy configuration transaction.
func (*HAProxyConfigurationManager) StartTransaction ¶
func (c *HAProxyConfigurationManager) StartTransaction(version int64) (string, error)
type HAProxyServer ¶
type TransactionMiddleware ¶
TransactionMiddleware is a middleware that manages transactions for HAProxy operations.
func NewTransactionMiddleware ¶
func NewTransactionMiddleware(configManager *HAProxyConfigurationManager) TransactionMiddleware