Documentation
¶
Index ¶
- type Cached
- func (cmd *Cached) Close() error
- func (cmd *Cached) Execute(ctx *appcontext.AppContext, repo *repository.Repository) (int, error)
- func (cmd *Cached) ListenAndServe(ctx *appcontext.AppContext) error
- func (cmd *Cached) Parse(ctx *appcontext.AppContext, args []string) error
- func (cmd *Cached) Watcher(listener net.Listener)
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) 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 ¶
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.
Click to show internal directories.
Click to hide internal directories.