ipld-eth-server/pkg/fs/tail.go

16 lines
260 B
Go
Raw Normal View History

package fs
import "github.com/hpcloud/tail"
type Tailer interface {
Tail() (*tail.Tail, error)
}
type FileTailer struct {
Path string
}
func (tailer FileTailer) Tail() (*tail.Tail, error) {
return tail.TailFile(tailer.Path, tail.Config{Follow: true})
}