<commit_before>// Package config contains the datastructures representing the configuration
// of proxima.
package config

import (
	"github.com/Symantec/scotty/lib/yamlutil"
	"time"
)

type Instance struct {
	// http://someHost.com:1234.
	HostAndPort string `yaml:"hostAndPort"`
	// The duration in this instance's retention policy
	Duration time.Duration `yaml:"duration"`
}

func (i *Instance) Reset() {
	*i = Instance{}
}

func (i *Instance) UnmarshalYAML(unmarshal func(interface{}) error) error {
	type instanceFields Instance
	return yamlutil.StrictUnmarshalYAML(unmarshal, (*instanceFields)(i))
}

type Cluster struct {
	// The instances
	Instances []Instance `yaml:"instances"`
}

func (c *Cluster) Reset() {
	*c = Cluster{}
}

func (c *Cluster) UnmarshalYAML(unmarshal func(interface{}) error) error {
	type clusterFields Cluster
	return yamlutil.StrictUnmarshalYAML(unmarshal, (*clusterFields)(c))
}

// Influx represents a single influx backend.
type Influx struct {
	// http://someHost.com:1234.
	HostAndPort string `yaml:"hostAndPort"`
	// The duration in this instance's retention policy
	Duration time.Duration `yaml:"duration"`
	// The influx Database to use
	Database string `yaml:"database"`
}

func (i *Influx) UnmarshalYAML(
	unmarshal func(interface{}) error) error {
	type influxFields Influx
	return yamlutil.StrictUnmarshalYAML(unmarshal, (*influxFields)(i))
}

// InfluxList represents a group of influx backends.
// InfluxList instances are to be treated as immutable.
type InfluxList []Influx

// Order returns an InfluxList like this one but ordered by duration
// in descending order
func (i InfluxList) Order() InfluxList {
	result := make(InfluxList, len(i))
	copy(result, i)
	orderInfluxes(result)
	return result
}<commit_msg>Remove unused types from config package.<commit_after>// Package config contains the datastructures representing the configuration
// of proxima.
package config

import (
	"github.com/Symantec/scotty/lib/yamlutil"
	"time"
)

// Influx represents a single influx backend.
type Influx struct {
	// http://someHost.com:1234.
	HostAndPort string `yaml:"hostAndPort"`
	// The duration in this instance's retention policy
	Duration time.Duration `yaml:"duration"`
	// The influx Database to use
	Database string `yaml:"database"`
}

func (i *Influx) UnmarshalYAML(
	unmarshal func(interface{}) error) error {
	type influxFields Influx
	return yamlutil.StrictUnmarshalYAML(unmarshal, (*influxFields)(i))
}

// InfluxList represents a group of influx backends.
// InfluxList instances are to be treated as immutable.
type InfluxList []Influx

// Order returns an InfluxList like this one but ordered by duration
// in descending order
func (i InfluxList) Order() InfluxList {
	result := make(InfluxList, len(i))
	copy(result, i)
	orderInfluxes(result)
	return result
}
{'fraction_non_alphanumeric': 0.10783965945370699, 'fraction_numerical': 0.004256828662646328, 'mean_word_length': 4.949367088607595, 'pattern_counts': {'":': 0, '<': 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': '5060016', 'n_tokens_mistral': 930, 'n_tokens_neox': 845, 'n_words': 280}