file

package
v0.0.0-...-c2832fb Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2016 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	Once bool   `short:"o" long:"once" description:"Read the file once, don't follow it"`
	DB   string `short:"d" long:"offset-db" description:"Track file offsets and use them"`

	Debug bool `long:"debug" description:"Output debug information to stderr"`
	// contains filtered or unexported fields
}

func (*CLI) Execute

func (c *CLI) Execute(args []string) error

type Entry

type Entry struct {
	Path       string      `json:"path"`
	Offset     int64       `json:"offset"`
	SameFileID samefile.ID `json:"samefileid"`
}

func (*Entry) CheckValid

func (e *Entry) CheckValid() error

func (*Entry) Valid

func (e *Entry) Valid() bool

type File

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

func NewFile

func NewFile(path string, offset int64) (*File, error)

func NewFollowFile

func NewFollowFile(path string, offset int64) (*File, error)

func (*File) Close

func (f *File) Close() error

func (*File) Generate

func (f *File) Generate() (*cypress.Message, error)

func (*File) GenerateLine

func (f *File) GenerateLine() (*Line, error)

func (*File) Lines

func (f *File) Lines() chan Line

func (*File) Tell

func (f *File) Tell() (int64, error)

type Line

type Line struct {
	Line   string
	Offset int64
	Time   time.Time
}

func (*Line) Next

func (l *Line) Next() int64

type Monitor

type Monitor struct {
	Debug bool
	// contains filtered or unexported fields
}

func NewMonitor

func NewMonitor() *Monitor

func (*Monitor) CloseFiles

func (m *Monitor) CloseFiles() error

func (*Monitor) FlushOffsets

func (m *Monitor) FlushOffsets()

func (*Monitor) Generator

func (m *Monitor) Generator() (*MonitorGenerator, error)

func (*Monitor) OpenFiles

func (m *Monitor) OpenFiles(once bool, args []string) error

func (*Monitor) OpenOffsetDB

func (m *Monitor) OpenOffsetDB(path string) error

func (*Monitor) Run

func (m *Monitor) Run(enc cypress.Receiver) error

func (*Monitor) SignalShutdown

func (m *Monitor) SignalShutdown()

func (*Monitor) WaitShutdown

func (m *Monitor) WaitShutdown()

func (*Monitor) WatchFiles

func (m *Monitor) WatchFiles()

type MonitorGenerator

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

func (*MonitorGenerator) Close

func (m *MonitorGenerator) Close() error

func (*MonitorGenerator) Generate

func (m *MonitorGenerator) Generate() (*cypress.Message, error)

type OffsetDB

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

func NewOffsetDB

func NewOffsetDB(path string) (*OffsetDB, error)

func (*OffsetDB) Get

func (o *OffsetDB) Get(path string) (*Entry, error)

func (*OffsetDB) Set

func (o *OffsetDB) Set(path string, offset int64) error

type Plugin

type Plugin struct {
	Paths    []string `toml:"paths" description:"shell list (can contain *) of paths to watch lines for"`
	OffsetDB string   `toml:"offsetdb" description:"path to use to store file offsets"`
}

func (*Plugin) Description

func (p *Plugin) Description() string

func (*Plugin) Generator

func (p *Plugin) Generator() (cypress.Generator, error)

func (*Plugin) Receiver

func (p *Plugin) Receiver() (cypress.Receiver, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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