MCPcopy Create free account
hub / github.com/coder/coder / contains

Method contains

coderd/provisionerdserver/acquirer.go:464–483  ·  view source on GitHub ↗
(p provisionerjobs.JobPosting)

Source from the content-addressed store, hash-verified

462}
463
464func (d domain) contains(p provisionerjobs.JobPosting) bool {
465 // If the organization ID is 'uuid.Nil', this is a legacy job posting.
466 // Ignore this check in the legacy case.
467 if p.OrganizationID != uuid.Nil && p.OrganizationID != d.organizationID {
468 return false
469 }
470 if !slices.Contains(d.pt, p.ProvisionerType) {
471 return false
472 }
473 for k, v := range p.Tags {
474 dv, ok := d.tags[k]
475 if !ok {
476 return false
477 }
478 if v != dv {
479 return false
480 }
481 }
482 return true
483}
484
485func (d domain) poll(dur time.Duration) {
486 tkr := time.NewTicker(dur)

Callers 7

jobPostedMethod · 0.80
FilterFunction · 0.80
handleClickOutsideFunction · 0.80
isInlineInputTargetFunction · 0.80
handleDragLeaveFunction · 0.80
handleBlurFunction · 0.80
handlerFunction · 0.80

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected