Documentation ¶
Index ¶
- func Bounded(a, lower, upper int) int
- func MaxInt(a, b int) int
- func MinInt(a, b int) int
- func Modulo(a, b int) int
- func RepositoryHostAndSlug(repositoryURL string) (string, string, error)
- func XDGConfigLocations(filename string) []string
- type NullDuration
- type NullString
- type NullTime
- type PollingStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RepositoryHostAndSlug ¶
func XDGConfigLocations ¶
Return possible locations of configuration files based on https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Types ¶
type NullDuration ¶
func NullSub ¶
func NullSub(after NullTime, before NullTime) NullDuration
func (NullDuration) String ¶
func (d NullDuration) String() string
type NullString ¶
type NullTime ¶
func MaxNullTime ¶
func MinNullTime ¶
func NullTimeFromString ¶
func NullTimeFromTime ¶
type PollingStrategy ¶
type PollingStrategy struct { InitialInterval time.Duration Multiplier float64 Randomizer float64 MaxInterval time.Duration Forever bool }
func NewPollingStrategy ¶
func NewPollingStrategy(initial int, max int, forever bool, d PollingStrategy) (PollingStrategy, error)
func (PollingStrategy) NextInterval ¶
func (s PollingStrategy) NextInterval(i time.Duration) time.Duration
Click to show internal directories.
Click to hide internal directories.