promtail

package
v0.0.0-...-9428452 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2018 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg ClientConfig) (*Client, error)

func (*Client) Line

func (c *Client) Line(ls model.LabelSet, t time.Time, s string) error

func (*Client) Stop

func (c *Client) Stop()

type ClientConfig

type ClientConfig struct {
	URL       flagext.URL
	BatchWait time.Duration
	BatchSize int
}

func (*ClientConfig) RegisterFlags

func (c *ClientConfig) RegisterFlags(flags *flag.FlagSet)

type Config

type Config struct {
	ScrapeConfig []ScrapeConfig `yaml:"scrape_config,omitempty"`

	// Catches all undefined fields and must be empty after parsing.
	XXX map[string]interface{} `yaml:",inline"`
}

func LoadConfig

func LoadConfig(filename string) (*Config, error)

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the yaml.Unmarshaler interface.

type NewTargetFunc

type NewTargetFunc func(path string, labels model.LabelSet) (*Target, error)

type Positions

type Positions struct {
	// contains filtered or unexported fields
}

func NewPositions

func NewPositions(cfg PositionsConfig) (*Positions, error)

func (*Positions) Get

func (p *Positions) Get(path string) int64

func (*Positions) Put

func (p *Positions) Put(path string, pos int64)

func (*Positions) Stop

func (p *Positions) Stop()

type PositionsConfig

type PositionsConfig struct {
	SyncPeriod    time.Duration
	PositionsFile string
}

func (*PositionsConfig) RegisterFlags

func (cfg *PositionsConfig) RegisterFlags(flags *flag.FlagSet)

type ScrapeConfig

type ScrapeConfig struct {
	JobName                string                        `yaml:"job_name,omitempty"`
	ServiceDiscoveryConfig config.ServiceDiscoveryConfig `yaml:",inline"`
	RelabelConfigs         []*config.RelabelConfig       `yaml:"relabel_configs,omitempty"`

	// Catches all undefined fields and must be empty after parsing.
	XXX map[string]interface{} `yaml:",inline"`
}

func (*ScrapeConfig) UnmarshalYAML

func (c *ScrapeConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements the yaml.Unmarshaler interface.

type Target

type Target struct {
	// contains filtered or unexported fields
}

func NewTarget

func NewTarget(c *Client, positions *Positions, path string, labels model.LabelSet) (*Target, error)

func (*Target) Stop

func (t *Target) Stop()

type TargetManager

type TargetManager struct {
	// contains filtered or unexported fields
}

func NewTargetManager

func NewTargetManager(
	logger log.Logger,
	scrapeConfig []ScrapeConfig,
	fn NewTargetFunc,
) (*TargetManager, error)

func (*TargetManager) Stop

func (tm *TargetManager) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL