You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: base.go
    path of file: ./repos/easeprobe/probe/base
    
    the code of the file until where you have to start completion: /*
 * Copyright (c) 2022, MegaEase
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Package base is the base package for all probes
package base

import (
	"fmt"
	"math"
	"net"
	"net/url"
	"os"
	"time"

	"github.com/prometheus/client_golang/prometheus"
	log "github.com/sirupsen/logrus"
	"golang.org/x/net/proxy"

	"github.com/megaease/easeprobe/global"
	"github.com/megaease/easeprobe/metric"
	"github.com/megaease/easeprobe/probe"
)

// Probe Simple Status
const (
	ServiceUp   int = 1
	ServiceDown int = 0
)

// ProbeFuncT
    
func (d *DefaultProbe) CheckStatusThreshold() probe.Status {
	s := d.StatusChangeThresholdSettings
	c := d.ProbeResult.Stat.StatusCounter
	title := d.LogTitle()
	log.Debugf("%s - Status Threshold Checking - Current[%v], StatusCnt[%d], FailureThread[%d], SuccessThread[%d]",
		title, c.CurrentStatus, c.StatusCount, s.Failure, s.Success)

	if c.CurrentStatus == true && c.StatusCount >= s.Success {
		if d.ProbeResult.Status != probe.StatusUp {
			cnt := math.Max(float64(c.StatusCount), float64(s.Success))
			log.Infof("%s - Status is UP! Threshold reached for success [%d/%d]", title, int(cnt), s.Success)
		}
		return probe.StatusUp
	}
	if c.CurrentStatus == false && c.StatusCount >= s.Failure {
		if d.ProbeResult.Status != probe.StatusDown {
			cnt := math.Max(float64(c.StatusCount), float64(s.Failure))
			log.Infof("%s - Status is DOWN! Threshold reached for failure [%d/%d]", title, int(cnt), s.Failure)
		}
		return probe.StatusDown
	}
	if c.CurrentStatus == true {
		log.Infof("%s - Status unchanged [%s]! Threshold is not reached for success [%d/%d].",
			title, d.ProbeResult.PreStatus, c.StatusCount, s.Success)
	} else {
		log.Infof("%s - Status unchanged [%s]! Threshold is not reached for failure [%d/%d].",
			title, d.ProbeResult.PreStatus, c.StatusCount, s.Failure)
	}
	return d.ProbeResult.PreStatus
}