watch

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callback

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

func (*Callback) Do

func (c *Callback) Do(r *http.Request)

type Handler

type Handler map[string]*Callback

type Watch

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

func New

func New(interval time.Duration) *Watch

func (*Watch) Add

func (w *Watch) Add(req *http.Request, callback func(file *http_fs.FileInfo)) error

func (*Watch) AddGet

func (w *Watch) AddGet(url string, callback func(file *http_fs.FileInfo)) error

func (*Watch) Close

func (w *Watch) Close()

func (*Watch) Remove

func (w *Watch) Remove(url string) error

func (*Watch) Update

func (w *Watch) Update(interval time.Duration)

Jump to

Keyboard shortcuts

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