// Detectors creates and returns a new instance of the Detector type with the
// parameters used by the Heartbeater for consistency.
775012
func (h *Heartbeater) Detector() Detector {
	return NewDetector(h.Location, h.pool, h.Strategy)
}
12181
func RegisteredNotifiers() []*NotifierDriver {
	registerMtx.Lock()
	defer registerMtx.Unlock()

	drivers := make([]*NotifierDriver, 0, len(notifiers))
	for _, driver := range notifiers {
		drivers = append(drivers, driver)
	}

	return drivers
}
18249
func (l *LinuxMonitor) SetupHandlers(m *config.ProcessorConfig) {

	l.proc.config = m
}
1127075
func (runner *Runner) detect() (string, string, string, bool) {
	for _, buildpack := range runner.config.BuildpackOrder() {

		buildpackPath, err := runner.buildpackPath(buildpack)
		if err != nil {
			printError(err.Error())
			continue
		}

		if runner.config.SkipDetect() {
			return buildpack, buildpackPath, "", true
		}

		if err := runner.warnIfDetectNotExecutable(buildpackPath); err != nil {
			printError(err.Error())
			continue
		}

		output := new(bytes.Buffer)
		err = runner.run(exec.Command(filepath.Join(buildpackPath, "bin", "detect"), runner.config.BuildDir()), output)

		if err == nil {
			return buildpack, buildpackPath, strings.TrimRight(output.String(), "\r\n"), true
		}
	}

	return "", "", "", false
}
702503
func (t *NotificationConfig) AddEvents(events ...NotificationEventType) {
	t.Events = append(t.Events, events...)
}
1029491
func NewListTrackers(g *libkb.GlobalContext, uid keybase1.UID) *ListTrackersEngine {
	return &ListTrackersEngine{
		uid:          uid,
		Contextified: libkb.NewContextified(g),
	}
}
564523
func DetectionType(d int) string {
	switch d {
	case TypeUnspecified:
		return "TYPE_UNSPECIFIED"
	case FaceDetection:
		return "FACE_DETECTION"
	case LandmarkDetection:
		return "LANDMARK_DETECTION"
	case LogoDetection:
		return "LOGO_DETECTION"
	case LabelDetection:
		return "LABEL_DETECTION"
	case TextDetection:
		return "TEXT_DETECTION"
	case DocumentTextDetection:
		return "DOCUMENT_TEXT_DETECTION"
	case SafeSearchDetection:
		return "SAFE_SEARCH_DETECTION"
	case ImageProperties:
		return "IMAGE_PROPERTIES"
	}
	return ""
}
556963
func NewMockBaseWatcher(ctrl *gomock.Controller) *MockBaseWatcher {
	mock := &MockBaseWatcher{ctrl: ctrl}
	mock.recorder = &MockBaseWatcherMockRecorder{mock}
	return mock
}
305480
func TLSServer(config *tls.Config, srv ListenServer) Detector {
	// TODO: isTLSClientHello can really benefit from more bytes
	return Detector{
		Needed:  minBytes,
		Test:    isTLSClientHello,
		Handler: newTLSShim(config, srv),
	}
}
1225455
func FallthroughDetector(hndl Handler) Detector {
	return Detector{
		Needed:  0,
		Test:    func([]byte) bool { return true },
		Handler: hndl,
	}
}
168595
func (s *IndexFacesInput) SetDetectionAttributes(v []*string) *IndexFacesInput {
	s.DetectionAttributes = v
	return s
}
594243
func (s *DetectTextOutput) SetTextDetections(v []*TextDetection) *DetectTextOutput {
	s.TextDetections = v
	return s
}
1077911
func (s *InviteMembersInput) SetDetectorId(v string) *InviteMembersInput {
	s.DetectorId = &v
	return s
}
1096973
func NewMonitor(ctx context.Context, nPages int, agentPipe io.Reader, server1_0, server1_2 net.Listener) (m *Monitor, err error) {
	m = &Monitor{
		ctx:              ctx,
		listeners:        make(map[listener.MonitorListener]struct{}),
		nPages:           nPages,
		perfReaderCancel: func() {}, // no-op to avoid doing null checks everywhere
	}

	// start new MonitorListener handler
	go m.connectionHandler1_0(ctx, server1_0)
	go m.connectionHandler1_2(ctx, server1_2)

	// start agent event pipe reader
	go m.agentPipeReader(ctx, agentPipe)

	return m, nil
}
631327
func (s *CreateDetectorOutput) SetDetectorId(v string) *CreateDetectorOutput {
	s.DetectorId = &v
	return s
}
1165216
func (s *ListMembersInput) SetDetectorId(v string) *ListMembersInput {
	s.DetectorId = &v
	return s
}
899976
func (s *ListThreatIntelSetsInput) SetDetectorId(v string) *ListThreatIntelSetsInput {
	s.DetectorId = &v
	return s
}