timeout

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTimeout = Timeout(30 * time.Second)

DefaultTimeout specifies the timeout for services that do not specify StopTimeout

Functions

This section is empty.

Types

type Timeout

type Timeout time.Duration

Timeout is a time.Duration that knows how to roundtrip to json and yaml

func (Timeout) MarshalJSON

func (t Timeout) MarshalJSON() ([]byte, error)

MarshalJSON is from the json.Marshaler interface

func (Timeout) Seconds

func (t Timeout) Seconds() float64

Seconds returns the duration as a floating point number of seconds.

func (Timeout) String

func (t Timeout) String() string

String returns a string representing the duration

func (*Timeout) UnmarshalJSON

func (t *Timeout) UnmarshalJSON(buf []byte) error

UnmarshalJSON is from the json.Unmarshaler interface

func (*Timeout) UnmarshalYAML

func (t *Timeout) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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