util

package
v0.0.0-...-50e0f8f Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MDLink(text, href string) string

func Obscure

func Obscure(input string, start int, end ...int) string

Types

type ISODuration

type ISODuration struct {
	Hour   int
	Minute int
	Second int
}

func ParseISODuration

func ParseISODuration(input string) (*ISODuration, error)

func (*ISODuration) Duration

func (d *ISODuration) Duration() time.Duration

func (*ISODuration) String

func (d *ISODuration) String() string

type Queue

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

func NewQueue

func NewQueue(concurrency int) *Queue

func (*Queue) Enqueue

func (q *Queue) Enqueue(job QueueItem)

func (*Queue) Start

func (q *Queue) Start(ctx context.Context)

type QueueItem

type QueueItem struct {
	ID   string
	Work func(context.Context)
}

Jump to

Keyboard shortcuts

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