deadline

package
v0.0.0-...-2e2bd14 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deadline

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

Deadline allows for commands to expire when they run too long

func New

func New(dl time.Time) *Deadline

New returns a new deadline object

func (*Deadline) Check

func (dl *Deadline) Check()

Check the deadline and panic when reached

func (*Deadline) GetDeadlineTime

func (dl *Deadline) GetDeadlineTime() time.Time

GetDeadlineTime returns the time object for the deadline, and an "empty" boolean

func (*Deadline) Hit

func (dl *Deadline) Hit() bool

Hit returns true if the deadline has been hit

Jump to

Keyboard shortcuts

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