Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InvalidationEvent ¶
type InvalidationEvent = types.InvalidationEvent
InvalidationEvent is an alias for types.InvalidationEvent
type PubSubSynchronizer ¶
type PubSubSynchronizer struct {
// contains filtered or unexported fields
}
PubSubSynchronizer implements cache synchronization using Redis Pub/Sub.
func NewPubSubSynchronizer ¶
func NewPubSubSynchronizer(client *redis.Client, channel, podID string) *PubSubSynchronizer
NewPubSubSynchronizer creates a new Pub/Sub synchronizer.
func (*PubSubSynchronizer) Close ¶
func (ps *PubSubSynchronizer) Close() error
Close closes the synchronizer.
func (*PubSubSynchronizer) OnInvalidate ¶
func (ps *PubSubSynchronizer) OnInvalidate(callback func(event InvalidationEvent))
OnInvalidate registers a callback for invalidation events.
func (*PubSubSynchronizer) Publish ¶
func (ps *PubSubSynchronizer) Publish(ctx context.Context, event InvalidationEvent) error
Publish publishes an invalidation event.
Click to show internal directories.
Click to hide internal directories.