Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlackUserRefreshWorker ¶
type SlackUserRefreshWorker struct {
// contains filtered or unexported fields
}
SlackUserRefreshWorker manages background refresh of Slack users from Slack API to database
Architecture assumptions: - Single server instance (no distributed locking) - For future horizontal scaling, implement distributed locking or leader election
func NewSlackUserRefreshWorker ¶
func NewSlackUserRefreshWorker(repo interfaces.Repository, slackSvc slack.Service, interval time.Duration, isOrgLevel bool) *SlackUserRefreshWorker
NewSlackUserRefreshWorker creates a new worker for refreshing Slack users. If isOrgLevel is true, the worker will call ListTeams to discover all workspaces and then ListUsers per workspace.
func (*SlackUserRefreshWorker) Start ¶
func (w *SlackUserRefreshWorker) Start(ctx context.Context) error
Start begins the background refresh loop - Initial sync and periodic refresh both run in a background goroutine - Does not block server startup
func (*SlackUserRefreshWorker) Stop ¶
func (w *SlackUserRefreshWorker) Stop()
Stop signals the worker to stop and waits for completion