Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidMessageType = errors.New(`invalid message type`)
ErrInvalidMessageType defines the message value extracting error
Functions ¶
func MessageValue ¶
MessageValue take the target value from the message
func NewSubscriber ¶
func NewSubscriber(timeInterval time.Duration, options ...Option) nc.Subscriber
NewSubscriber with interval message generation
Types ¶
type Option ¶
type Option func(opt *Options)
Option func type
func WithErrorHandler ¶
func WithErrorHandler(h nc.ErrorHandler) Option
WithErrorHandler set handler of error processing
func WithHandler ¶
func WithHandler(h handler) Option
WithHandler set custom message generation function
func WithPanicHandler ¶
func WithPanicHandler(h nc.PanicHandler) Option
WithPanicHandler set handler of panic processing
type Options ¶
type Options struct { // Handler generates message by time interval Handler handler // ErrorHandler of message processing ErrorHandler nc.ErrorHandler // PanicHandler process panic PanicHandler nc.PanicHandler }
Options time interval wrapper
Click to show internal directories.
Click to hide internal directories.