Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger = log.Logger("dealpusher")
Functions ¶
This section is empty.
Types ¶
type DealPusher ¶
type DealPusher struct {
// contains filtered or unexported fields
}
DealPusher represents a struct that encapsulates the data and functionality related to pushing deals in a replication process.
func NewDealPusher ¶
func (*DealPusher) Name ¶
func (*DealPusher) Name() string
func (*DealPusher) Start ¶
func (d *DealPusher) Start(ctx context.Context, exitErr chan<- error) error
Start initializes and starts the DealPusher service.
It first attempts to register the worker with the health check system. If another worker is already running, it waits and retries until it can register or the context is cancelled. Once registered, it launches three main activities in separate goroutines:
- Reporting its health status.
- Running the deal processing loop.
- Handling cleanup when the service is stopped.
Parameters:
- ctx : The context for managing the lifecycle of the Start function. If Done, the function exits cleanly.
- exitErr : A channel for an error or nil when the service exits
Returns:
- An error if there was a problem starting the service.
This function is intended to be called once at the start of the service lifecycle.
Click to show internal directories.
Click to hide internal directories.