Documentation ¶
Index ¶
Constants ¶
View Source
const ( HA_STATE_SCRIPT_NAME = "ha_state.sh" HA_STATE_SCRIPT_CONTENT = ` #!/bin/bash echo "$@" >%s ` HA_STATE_FILENAME = "ha_state" )
Variables ¶
This section is empty.
Functions ¶
func StartService ¶
func StartService()
Types ¶
type ApiHelper ¶
type ApiHelper struct {
// contains filtered or unexported fields
}
func NewApiHelper ¶
func (*ApiHelper) SetHaStateProvider ¶
func (h *ApiHelper) SetHaStateProvider(hsp HaStateProvider)
type HaStateProvider ¶
type HaStateWatcher ¶
type HaStateWatcher struct { HaStateScriptPath string HaStatePath string CurrentState string // TODO hide it C chan string // contains filtered or unexported fields }
func NewHaStateWatcher ¶
func NewHaStateWatcher(opts *Options) (hsw *HaStateWatcher, err error)
func (*HaStateWatcher) Run ¶
func (hsw *HaStateWatcher) Run(ctx context.Context)
func (*HaStateWatcher) StateChannel ¶
func (hsw *HaStateWatcher) StateChannel() <-chan string
func (*HaStateWatcher) StateScript ¶
func (hsw *HaStateWatcher) StateScript() string
type HaproxyHelper ¶
type HaproxyHelper struct {
// contains filtered or unexported fields
}
func NewHaproxyHelper ¶
func NewHaproxyHelper(opts *Options) (*HaproxyHelper, error)
func (*HaproxyHelper) Run ¶
func (h *HaproxyHelper) Run(ctx context.Context)
type LbagentCmd ¶
type LbagentCmd struct { Type LbagentCmdType Data interface{} }
type LbagentCmdType ¶
type LbagentCmdType uintptr
const ( LbagentCmdUseCorpus LbagentCmdType = iota LbagentCmdStopDaemons )
type LbagentCmdUseCorpusData ¶
type LbagentCmdUseCorpusData struct { Corpus *agentmodels.LoadbalancerCorpus AgentParams *agentmodels.AgentParams Wg sync.WaitGroup }
type LbagentOptions ¶
type LbagentOptions struct { ApiLbagentId string `require:"true"` ApiLbagentHbInterval int `default:"10"` ApiLbagentHbTimeoutRelaxation int `` /* 162-byte string literal not displayed */ ApiSyncIntervalSeconds int `default:"10"` ApiRunDelayMilliseconds int `default:"10"` ApiListBatchSize int `default:"1024"` DataPreserveN int `default:"8" help:"number of recent data to preserve on disk"` BaseDataDir string // `required:"true"` KeepalivedBin string `default:"keepalived"` HaproxyBin string `default:"haproxy"` GobetweenBin string `default:"gobetween"` TelegrafBin string `default:"telegraf"` // contains filtered or unexported fields }
type Options ¶
type Options struct { common_options.CommonOptions LbagentOptions }
func (*Options) ValidateThenInit ¶
type OvnHost ¶
type OvnHost struct { Bar *Bar // contains filtered or unexported fields }
func (*OvnHost) Refresh ¶
func (ovnHost *OvnHost) Refresh(ctx context.Context, lb *agentmodels.Loadbalancer) error
func (*OvnHost) SetAddrIdx ¶
type OvnWorker ¶
type OvnWorker struct { Bar *Bar // contains filtered or unexported fields }
func NewOvnWorker ¶
func NewOvnWorker() *OvnWorker
func (*OvnWorker) Refresh ¶
func (ovn *OvnWorker) Refresh(ctx context.Context, lbs agentmodels.Loadbalancers) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.