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" )
View Source
const ( ErrOvnService = errors.Error("ovn controller") ErrOvnConfig = errors.Error("ovn controller configuration") )
Variables ¶
This section is empty.
Functions ¶
func StartService ¶
func StartService()
Types ¶
type ApiHelper ¶
type ApiHelper struct {
// contains filtered or unexported fields
}
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, lbagentId string) (*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 LbagentCommonOptions ¶
type LbagentCommonOptions struct { common_options.HostCommonOptions // 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"` DisableLocalVpc bool `help:"disable local VPC support" default:"false"` // contains filtered or unexported fields }
type Options ¶
type Options struct { LbagentCommonOptions ovnutils.SOvnOptions CommonConfigFile string `help:"common config file for container"` ListenInterface string `help:"listening interface of lbagent" default:"eth0"` AccessIp string `help:"access ip of lbagent, if there are multiple IPs on listen interface"` }
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 (*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.