<commit_before>package agent

import (
	"crypto/tls"
	"errors"
	"fmt"
	"io"
	"log"
	"net"
	"strconv"
	"sync"
	"time"

	"github.com/hashicorp/scada-client"
)

const (
	// providerService is the service name we use
	providerService = "consul"

	// resourceType is the type of resource we represent
	// when connecting to SCADA
	resourceType = "infrastructures"
)

// ProviderService returns the service information for the provider
func ProviderService(c *Config) *client.ProviderService {
	return &client.ProviderService{
		Service:        providerService,
		ServiceVersion: fmt.Sprintf("%s%s", c.Version, c.VersionPrerelease),
		Capabilities: map[string]int{
			"http": 1,
		},
		Meta: map[string]string{
			"server":     strconv.FormatBool(c.Server),
			"datacenter": c.Datacenter,
		},
		ResourceType: resourceType,
	}
}

// ProviderConfig returns the configuration for the SCADA provider
func ProviderConfig(c *Config) *client.ProviderConfig {
	return &client.ProviderConfig{
		Service: ProviderService(c),<commit_msg>agent: Provide auto-join metadata to SCADA<commit_after>package agent

import (
	"crypto/tls"
	"errors"
	"fmt"
	"io"
	"log"
	"net"
	"strconv"
	"sync"
	"time"

	"github.com/hashicorp/scada-client"
)

const (
	// providerService is the service name we use
	providerService = "consul"

	// resourceType is the type of resource we represent
	// when connecting to SCADA
	resourceType = "infrastructures"
)

// ProviderService returns the service information for the provider
func ProviderService(c *Config) *client.ProviderService {
	return &client.ProviderService{
		Service:        providerService,
		ServiceVersion: fmt.Sprintf("%s%s", c.Version, c.VersionPrerelease),
		Capabilities: map[string]int{
			"http": 1,
		},
		Meta: map[string]string{
			"auto-join":  strconv.FormatBool(c.AtlasJoin),
			"datacenter": c.Datacenter,
			"server":     strconv.FormatBool(c.Server),
		},
		ResourceType: resourceType,
	}
}

// ProviderConfig returns the configuration for the SCADA provider
func ProviderConfig(c *Config) *client.ProviderConfig {
	return &client.ProviderConfig{
		Service: ProviderService(c),
{'fraction_non_alphanumeric': 0.11645450259311646, 'fraction_numerical': 0.000942951438000943, 'mean_word_length': 4.469072164948454, 'pattern_counts': {'":': 7, '<': 3, '<?xml version=': 0, '>': 3, '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': '4189289', 'n_tokens_mistral': 736, 'n_tokens_neox': 680, 'n_words': 176}