<commit_before>// Copyright © 2017 Circonus, Inc. <<EMAIL>>
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//

package server

import (
	"context"
	"net"
	"net/http"
	"os"
	"regexp"
	"runtime"
	"sync"
	"time"

	"github.com/circonus-labs/circonus-agent/internal/builtins"
	"github.com/circonus-labs/circonus-agent/internal/check"
	"github.com/circonus-labs/circonus-agent/internal/config"
	"github.com/circonus-labs/circonus-agent/internal/config/defaults"
	"github.com/circonus-labs/circonus-agent/internal/plugins"
	"github.com/circonus-labs/circonus-agent/internal/statsd"
	cgm "github.com/circonus-labs/circonus-gometrics/v3"
	"github.com/pkg/errors"
	"github.com/rs/zerolog"
	"github.com/rs/zerolog/log"
	"github.com/spf13/viper"
	"golang.org/x/sync/errgroup"
)

type httpServer struct {
	address *net.TCPAddr
	server  *http.Server
}

type socketServer struct {
	address  *net.UnixAddr
	listener *net.UnixListener
	server   *http.Server
}

type sslServer struct {
	address  *net.TCPAddr
	certFile string
	keyFile  string
	server   *http.Server
}

// Server defines the listening servers
type Server struct {
	group    *errgroup.Group
	groupCtx context.Context
	builtins *builtins.Builtins
	check    *check.Check
	// ctx        context.Context
	logger     zerolog.Logger
	plugins    *plugins.Plugins
	svrHTTP    []*httpServer
	svrHTTPS   *sslServer
	svrSockets []*socketServer
	statsdSvr  *statsd.Server
}

type previousMetrics struct {<commit_msg>upd: remove dead code<commit_after>// Copyright © 2017 Circonus, Inc. <<EMAIL>>
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//

package server

import (
	"context"
	"net"
	"net/http"
	"os"
	"regexp"
	"runtime"
	"sync"
	"time"

	"github.com/circonus-labs/circonus-agent/internal/builtins"
	"github.com/circonus-labs/circonus-agent/internal/check"
	"github.com/circonus-labs/circonus-agent/internal/config"
	"github.com/circonus-labs/circonus-agent/internal/config/defaults"
	"github.com/circonus-labs/circonus-agent/internal/plugins"
	"github.com/circonus-labs/circonus-agent/internal/statsd"
	cgm "github.com/circonus-labs/circonus-gometrics/v3"
	"github.com/pkg/errors"
	"github.com/rs/zerolog"
	"github.com/rs/zerolog/log"
	"github.com/spf13/viper"
	"golang.org/x/sync/errgroup"
)

type httpServer struct {
	address *net.TCPAddr
	server  *http.Server
}

type socketServer struct {
	address  *net.UnixAddr
	listener *net.UnixListener
	server   *http.Server
}

type sslServer struct {
	address  *net.TCPAddr
	certFile string
	keyFile  string
	server   *http.Server
}

// Server defines the listening servers
type Server struct {
	group      *errgroup.Group
	groupCtx   context.Context
	builtins   *builtins.Builtins
	check      *check.Check
	logger     zerolog.Logger
	plugins    *plugins.Plugins
	svrHTTP    []*httpServer
	svrHTTPS   *sslServer
	svrSockets []*socketServer
	statsdSvr  *statsd.Server
}

type previousMetrics struct {
{'fraction_non_alphanumeric': 0.1166277907364212, 'fraction_numerical': 0.004665111629456847, 'mean_word_length': 3.953795379537954, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1042407', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1131, 'n_words': 221}