fileflag

package
v0.0.0-...-5c114db Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package fileflag provides the FileFlag type, which lets you use asynchronous flags for interprocess semaphore.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileFlag

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

func NewFileFlag

func NewFileFlag(filename string) (ff *FileFlag, err error)

NewFileFlag creates a new FileFlag.

func (*FileFlag) Close

func (ff *FileFlag) Close()

Close closes the FileFlag and disables its watcher. This will also release all waits. This method is nil-safe.

func (*FileFlag) Wait

func (ff *FileFlag) Wait()

Wait blocks until the flag has been removed. If the flag is already removed, it is a passthrough.

func (*FileFlag) WaitForDone

func (ff *FileFlag) WaitForDone()

WaitForDone blocks until the flag has completely been resolved.

func (*FileFlag) WaitForStart

func (ff *FileFlag) WaitForStart()

WaitForStart blocks until the flag exists. If it already exists, it is a passthrough.

func (*FileFlag) WaitForWatch

func (ff *FileFlag) WaitForWatch()

WaitForWatch blocks until the flag has been watched.

func (*FileFlag) Watch

func (ff *FileFlag) Watch()

Watch is our goroutine for watching for changes.

Jump to

Keyboard shortcuts

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