Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultRetryInterval defines the Default Retry Interval of the message requester. DefaultRetryInterval = 10 * time.Second )
Variables ¶
View Source
var ( // DefaultRequestWorkerCount defines the Default Request Worker Count of the message requester. DefaultRequestWorkerCount = runtime.GOMAXPROCS(0) )
Functions ¶
This section is empty.
Types ¶
type Events ¶
type Events struct {
// Fired when a request for a given message should be sent.
SendRequest *events.Event
}
Events represents events happening on a message requester.
type MessageRequester ¶
type MessageRequester struct {
Events Events
// contains filtered or unexported fields
}
MessageRequester takes care of requesting messages.
func New ¶
func New(optionalOptions ...Option) *MessageRequester
New creates a new message requester.
func (*MessageRequester) ScheduleRequest ¶
func (requester *MessageRequester) ScheduleRequest(messageId message.Id)
ScheduleRequest schedules a request for the given message.
func (*MessageRequester) StopRequest ¶
func (requester *MessageRequester) StopRequest(messageId message.Id)
StopRequest stops requests for the given message to further happen.
type Option ¶
type Option func(*Options)
Option is a function which inits an option.
func RetryInterval ¶
RetryInterval creates an option which sets the retry interval to the given value.
func WorkerCount ¶
WorkerCount creates an option which sets the worker count to the given value.
Click to show internal directories.
Click to hide internal directories.