draincommand

package
v3.0.0-beta10 Latest Latest
Warning

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

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

Documentation

Overview

Package draincommand is a helper for daemon drain commands

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDrained = errors.New("drained command")
)

Functions

func Do

func Do(c <-chan any, duration time.Duration)

Do drains the command chan c If pending command is an ErrorSetter, it set cmd error to ErrDrained

Types

type ErrC

type ErrC chan<- error

ErrC defines error channel for command

func (ErrC) SetError

func (c ErrC) SetError(err error)

type ErrorSetter

type ErrorSetter interface {
	SetError(error)
}

Jump to

Keyboard shortcuts

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