Documentation
¶
Overview ¶
Package app wires the roles of the binary: serve, worker, runner, migrate, admin.
Every role loads the same configuration (env + *_FILE), builds its logger and runs until the context ends (SIGINT/SIGTERM). Two helper commands without a role of their own: healthcheck (for distroless containers without a shell) and version.
Index ¶
Constants ¶
const ( ExitOK = 0 ExitError = 1 ExitUsage = 2 )
Exit codes.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppMatchEvaluator ¶
type AppMatchEvaluator struct {
// contains filtered or unexported fields
}
AppMatchEvaluator adapts matching profile evaluation to the urlimport MatchEvaluator interface.
func NewMatchEvaluator ¶
func NewMatchEvaluator(profiles matching.Profiles, matching matching.Store) *AppMatchEvaluator
NewMatchEvaluator returns a MatchEvaluator backed by the matching module.
type BoardDiscoveryArgs ¶
type BoardDiscoveryArgs struct{}
BoardDiscoveryArgs looks for the own boards of companies seen only on job boards; queued after each crawl.
func (BoardDiscoveryArgs) InsertOpts ¶
func (BoardDiscoveryArgs) InsertOpts() river.InsertOpts
InsertOpts runs discovery on the crawl queue (never alongside a crawl); at most one waits or runs.
func (BoardDiscoveryArgs) Kind ¶
func (BoardDiscoveryArgs) Kind() string
Kind implements river.JobArgs.
type CleanupArgs ¶
type CleanupArgs struct{}
CleanupArgs removes expired sign-in tokens, sessions, invitations, and screenshots past retention.
type CrawlArgs ¶
type CrawlArgs struct {
Manual bool `json:"manual,omitempty"`
}
CrawlArgs starts a crawl of all sources. Manual crawls (admin crawl) are unique apart from scheduled ones, so one can wait while a scheduled crawl runs.
func (CrawlArgs) InsertOpts ¶
func (CrawlArgs) InsertOpts() river.InsertOpts
InsertOpts puts crawls on their own queue (one runs at a time); per kind of trigger at most one waits or runs.
type DailySummaryArgs ¶
type DailySummaryArgs struct{}
DailySummaryArgs triggers scheduled delivery of daily application summaries.
func (DailySummaryArgs) InsertOpts ¶
func (DailySummaryArgs) InsertOpts() river.InsertOpts
InsertOpts ensures at most one daily summary check waits or runs.
type HandoffArgs ¶
type HandoffArgs struct{}
HandoffArgs warns before handoff windows close and parks applications whose window closed.
func (HandoffArgs) InsertOpts ¶
func (HandoffArgs) InsertOpts() river.InsertOpts
InsertOpts places handoff watching on the apply queue.
type InboxArgs ¶
InboxArgs triggers an inbox check for a single user or all enabled mailboxes.
func (InboxArgs) InsertOpts ¶
func (a InboxArgs) InsertOpts() river.InsertOpts
InsertOpts: at most one inbox check runs or waits.
type MatchArgs ¶
MatchArgs matches open jobs for one user, or for all users when UserID is nil (after a crawl).
func (MatchArgs) InsertOpts ¶
func (a MatchArgs) InsertOpts() river.InsertOpts
InsertOpts: at most one run over all users waits or runs. Runs for one user are never merged, so a profile change during a run is not lost.
type PlanArgs ¶
type PlanArgs struct{}
PlanArgs runs the planner to queue matching applications according to user quotas and pacing.
func (PlanArgs) InsertOpts ¶
func (PlanArgs) InsertOpts() river.InsertOpts
InsertOpts: at most one planner run waits or runs.
type RecoverArgs ¶
type RecoverArgs struct{}
RecoverArgs turns applications stuck in submitting into submit_unknown.
func (RecoverArgs) InsertOpts ¶
func (RecoverArgs) InsertOpts() river.InsertOpts
InsertOpts places recovery on the apply queue.
type RiverCrawlQueue ¶
type RiverCrawlQueue struct {
// contains filtered or unexported fields
}
RiverCrawlQueue connects the URL import service to River crawl worker jobs.
func NewCrawlQueue ¶
func NewCrawlQueue(inserter *queue.Client, pool *pgxpool.Pool) *RiverCrawlQueue
NewCrawlQueue returns a CrawlQueue backed by River.
func (*RiverCrawlQueue) IsQueued ¶
func (q *RiverCrawlQueue) IsQueued(ctx context.Context) (bool, error)
IsQueued reports whether a crawl job is currently waiting in the River queue.
func (*RiverCrawlQueue) QueueCrawl ¶
func (q *RiverCrawlQueue) QueueCrawl(ctx context.Context) (bool, error)
QueueCrawl queues an immediate manual crawl.
type SearchAlertArgs ¶
type SearchAlertArgs struct{}
SearchAlertArgs checks the saved searches with an alert for new jobs (each at most once a day).
func (SearchAlertArgs) InsertOpts ¶
func (SearchAlertArgs) InsertOpts() river.InsertOpts
InsertOpts ensures at most one check waits or runs.