file

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

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

Resource is a local file. If the incoming path is in [".","file://","/"] it will be a file resource. The watching logic will not be a poller, but will instead be an event listener.

func NewResource

func NewResource(file string) (Resource, error)

func (Resource) Poll

func (r Resource) Poll(context.Context) (bool, error)

func (Resource) Refresh

func (r Resource) Refresh(_ context.Context, updateFunc func(io.Reader), errorHandler func(error))

Jump to

Keyboard shortcuts

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