cached

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: ISC Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cached

type Cached struct {
	subcommands.SubcommandBase
	// contains filtered or unexported fields
}

func (*Cached) Close

func (cmd *Cached) Close() error

func (*Cached) Execute

func (cmd *Cached) Execute(ctx *appcontext.AppContext, repo *repository.Repository) (int, error)

func (*Cached) ListenAndServe

func (cmd *Cached) ListenAndServe(ctx *appcontext.AppContext) error

func (*Cached) Parse

func (cmd *Cached) Parse(ctx *appcontext.AppContext, args []string) error

func (*Cached) Watcher

func (cmd *Cached) Watcher(listener net.Listener)

Background task dealing with the teardown, basically anything running sends a message over the channel, when task is done we get another message. If the teardown time passes and nothing is in flight we are free to stop, otherwise someone is running and we need to stay alive. This is not a perfect "last request + teardown seconds" implementation but it's close enough for our need and is simpler. This is conceptually a waitgroup, except we can't use a waitgroup as it has one special property (you can't reincrement the semaphore while a Wait() is in progress) that our use case would transgress.

Jump to

Keyboard shortcuts

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