feed

package
v0.0.0-...-ca61c3d Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AnnotateModule = fx.Options(

	fx.Provide(
		NewWatcher,
	),

	fx.Provide(

		fx.Annotate(
			NewWatcher,

			fx.ResultTags(`group:"watchers"`),
		),
	),
)

AnnotateModule is the module defined in this file.

View Source
var FileWatcherModule = fx.Options(
	fx.Provide(

		fx.Annotate(
			NewFileWatcher,
			fx.As(new(Watcher)),
			fx.ResultTags(`group:"watchers"`),
		),
	),
)

FileWatcherModule provides a FileWatcher as a Watcher.

View Source
var ResultModule = fx.Options(

	fx.Provide(New),
)

ResultModule is the module defined in this file.

Functions

This section is empty.

Types

type FileWatcher

type FileWatcher struct{}

FileWatcher watches files.

func NewFileWatcher

func NewFileWatcher() (*FileWatcher, error)

NewFileWatcher builds a new file watcher. --8<-- [start:new-fw-init]

type Result

type Result struct {
	fx.Out

	// ...
	// --8<-- [end:result-init-1]
	Watcher Watcher `group:"watchers"`
}

Result is the result of an operation. --8<-- [start:result-tagged] --8<-- [start:result-init-1]

func New

func New() (Result, error)

New produces a result object. --8<-- [start:new-init-1] --8<-- [start:new-watcher]

type Watcher

type Watcher interface{}

Watcher watches for events.

func NewWatcher

func NewWatcher() (Watcher, error)

NewWatcher builds a watcher. --8<-- [start:new-init]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳