Documentation
¶
Index ¶
- Constants
- Variables
- type DrainFunc
- type Drainer
- type Queue
- func (s *Queue) Add(x interface{}) error
- func (s *Queue) Flush(ctx context.Context, batch []interface{}) (err error)
- func (s *Queue) IsUp() bool
- func (s *Queue) MustAdd(x interface{})
- func (s *Queue) MustRun(ctx context.Context)
- func (s *Queue) Run(ctx context.Context) error
- func (s *Queue) Stats() (total, flush_size, flush_tick, flush_err uint64)
Constants ¶
View Source
const ( DefaultInterval = time.Second DefaultSize = 1000 )
Variables ¶
View Source
var (
AlreadyRunningError = errors.New("Queue already running.")
)
View Source
var (
NoDrainerError = errors.New("No Drainer in Queue")
)
View Source
var (
NotRunningError = errors.New("Queue is not running")
)
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.