worker

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL