Back to

package blackbox

v0.0.0 (5962cd0)
Latest Go to latest
Published: Apr 2, 2018 | License: Apache-2.0 | Module:



const POLL_INTERVAL = 5 * time.Second

func NewFileWatcher

func NewFileWatcher(
	logger *log.Logger,
	sourceDir string,
	dynamicGroupClient grouper.DynamicClient,
	drainerFactory syslog.DrainerFactory,
) *fileWatcher

type Config

type Config struct {
	Hostname string `yaml:"hostname"`

	Syslog SyslogConfig `yaml:"syslog"`

func LoadConfig

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

type Duration

type Duration time.Duration

func (*Duration) UnmarshalYAML

func (d *Duration) UnmarshalYAML(unmarshal func(interface{}) error) error

type SyslogConfig

type SyslogConfig struct {
	Destination syslog.Drain `yaml:"destination"`
	SourceDir   string       `yaml:"source_dir"`

type Tailer

type Tailer struct {
	Path    string
	Tag     string
	Drainer syslog.Drainer

func (*Tailer) Run

func (tailer *Tailer) Run(signals <-chan os.Signal, ready chan<- struct{}) error
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier