Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultConfig = *flagutil.DefaultConfigFromFlags(&Config{}).(*Config)
DefaultConfig provides default values for the config
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
Cluster connects an Agent to other Agents and allows them to distribute workload.
func New ¶
func New( l log.Logger, reg prometheus.Registerer, cfg Config, im instance.Manager, validate ValidationFunc, ) (*Cluster, error)
New creates a new Cluster.
func (*Cluster) ApplyConfig ¶
ApplyConfig applies configuration changes to Cluster.
func (*Cluster) Reshard ¶
func (c *Cluster) Reshard(ctx context.Context, _ *agentproto.ReshardRequest) (*empty.Empty, error)
Reshard implements agentproto.ScrapingServiceServer, and syncs the state of configs with the configstore.
type Config ¶
type Config struct { Enabled bool `yaml:"enabled"` ReshardInterval time.Duration `yaml:"reshard_interval"` ReshardTimeout time.Duration `yaml:"reshard_timeout"` KVStore kv.Config `yaml:"kvstore"` Lifecycler ring.LifecyclerConfig `yaml:"lifecycler"` DangerousAllowReadingFiles bool `yaml:"dangerous_allow_reading_files"` // TODO(rfratto): deprecate scraping_service_client in Agent and replace with this. Client client.Config `yaml:"-"` }
Config describes how to instantiate a scraping service Server instance.
func (*Config) RegisterFlags ¶
RegisterFlags adds the flags required to config the Server to the given FlagSet.
func (*Config) RegisterFlagsWithPrefix ¶
RegisterFlagsWithPrefix adds the flags required to config this to the given FlagSet with a specified prefix.
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler.
type OwnershipFunc ¶
OwnershipFunc should determine if a given keep is owned by the caller.
type ValidationFunc ¶
ValidationFunc should validate a config.