Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrContextDone = errors.New("context is done") ErrAlreadyClosed = errors.New("output already closed") )
Functions ¶
This section is empty.
Types ¶
type LBSInfo ¶ added in v0.2.0
LBSInfo contains information about a data stream in LBS. It's an internal data structure.
func CreateByKspNotification ¶ added in v0.2.0
func CreateByParts ¶ added in v0.2.0
func (*LBSInfo) FormMutexKey ¶ added in v0.2.0
type LBSInputMessage ¶ added in v0.2.0
LBSMessage is the format in which the message should be written to LBS
type NotificationBroker ¶ added in v0.3.2
type NotificationBroker struct {
// contains filtered or unexported fields
}
func NewNotificationBroker ¶ added in v0.3.2
func NewNotificationBroker(output chan<- RecoverableRedisNotification, bufferSize int) *NotificationBroker
func (*NotificationBroker) Close ¶ added in v0.3.2
func (b *NotificationBroker) Close()
func (*NotificationBroker) Send ¶ added in v0.3.2
func (b *NotificationBroker) Send(ctx context.Context, m RecoverableRedisNotification) bool
type NotificationType ¶
type NotificationType int
Types of notifications sent to client.
const ( StreamAdded NotificationType = iota StreamDisowned StreamExpired StreamTerminated )
type RecoverableRedisNotification ¶
type RecoverableRedisNotification struct {
Type NotificationType
Payload LBSInfo
// AdditionalInfo is an echo from any additional data seeded in LBSInputMessage
AdditionalInfo map[string]any
}
RecoverableRedisNotification captures the type of notifications sent to client. These are captured by NotificationType enum.
func Make ¶
func Make(notifType NotificationType, lbsInfo LBSInfo, additionalInfo map[string]any) RecoverableRedisNotification
func MakeStreamTerminatedNotif ¶ added in v0.2.2
func MakeStreamTerminatedNotif(info string) RecoverableRedisNotification
Click to show internal directories.
Click to hide internal directories.