hail

package
v0.0.0-...-98ed532 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(ctx context.Context, file string) (<-chan *Received, error)

Open opens a channel for hailing. A *Received is sent in the returned channel whenever the file located by the file name provided is created, updated, or deleted.

func Send

func Send(file string, data []byte) error

Send sends a hail by saving data to the file located by the file name provided.

Types

type Received

type Received struct {
	Open  time.Time
	Time  time.Time
	Data  []byte
	Error error
}

Received represents the data related to a message sent via watched file.

Jump to

Keyboard shortcuts

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