MCPcopy Index your code
hub / github.com/coder/coder / NewAcquirer

Function NewAcquirer

coderd/provisionerdserver/acquirer.go:69–85  ·  view source on GitHub ↗
(ctx context.Context, logger slog.Logger, store AcquirerStore, ps pubsub.Pubsub,
	opts ...AcquirerOption,
)

Source from the content-addressed store, hash-verified

67}
68
69func NewAcquirer(ctx context.Context, logger slog.Logger, store AcquirerStore, ps pubsub.Pubsub,
70 opts ...AcquirerOption,
71) *Acquirer {
72 a := &Acquirer{
73 ctx: ctx,
74 logger: logger,
75 store: store,
76 ps: ps,
77 q: make(map[dKey]domain),
78 backupPollDuration: backupPollDuration,
79 }
80 for _, opt := range opts {
81 opt(a)
82 }
83 a.subscribe()
84 return a
85}
86
87// AcquireJob acquires a job with one of the given provisioner types and compatible
88// tags from the database. The call blocks until a job is acquired, the context is

Callers 11

NewFunction · 0.92
TestAcquirer_StoreFunction · 0.92
TestAcquirer_SingleFunction · 0.92
TestAcquirer_BackupPollFunction · 0.92
TestAcquirer_MatchTagsFunction · 0.92
setupFunction · 0.92

Calls 1

subscribeMethod · 0.95

Tested by 10

TestAcquirer_StoreFunction · 0.74
TestAcquirer_SingleFunction · 0.74
TestAcquirer_BackupPollFunction · 0.74
TestAcquirer_MatchTagsFunction · 0.74
setupFunction · 0.74