buffer

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package buffer is defined below

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PublisherTask

type PublisherTask func(chan struct{})

PublisherTask task

type PublisherTaskBuffer

type PublisherTaskBuffer interface {
	// the main executor loop that should be started on a new goroutine
	Run()
	// Call to submit into the buffer, will succeed unless we are terminating
	Submit(task PublisherTask) bool
	// Call to terminate that will attempt to shutdown gracefully
	Terminate(timer *time.Timer) bool
	// Call terminate without waiting for the event loop to complete
	TerminateNow()
}

PublisherTaskBuffer interface

func NewChannelBasedPublisherTaskBuffer

func NewChannelBasedPublisherTaskBuffer(capacity int, sharedTaskQueueGetter func() chan core.SendTask) PublisherTaskBuffer

NewChannelBasedPublisherTaskBuffer function

Jump to

Keyboard shortcuts

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