Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // GetServerIDs ... GetServerIDs() []int64 // GetServerName ... GetServerName(serverID int64) string // DeleteCacheKeys ... DeleteCacheKeys(ctx context.Context, serverID int64, keys []string) error }
Client ...
type InvalidateEvent ¶
type InvalidateEvent struct { ID int64 `db:"id"` Seq sql.NullInt64 `db:"seq"` Data string `db:"data"` }
InvalidateEvent ...
func (InvalidateEvent) GetSequence ¶
func (e InvalidateEvent) GetSequence() uint64
GetSequence returns the event sequence number, = 0 if sequence is null
func (InvalidateEvent) GetSize ¶
func (e InvalidateEvent) GetSize() uint64
GetSize returns the approximate size (in bytes) of the event, for limit batch size by event data size using WithSubscriberSizeLimit for configuring this limit
type InvalidatorJob ¶
type InvalidatorJob struct {
// contains filtered or unexported fields
}
InvalidatorJob ...
func NewInvalidatorJob ¶
func NewInvalidatorJob(repo Repository, client Client, options ...Option) *InvalidatorJob
NewInvalidatorJob ...
type Option ¶
type Option func(conf *jobConfig)
Option ...
func WithRetentionOptions ¶
func WithRetentionOptions(options ...eventx.RetentionOption) Option
WithRetentionOptions ...
func WithRetryConsumerOptions ¶
func WithRetryConsumerOptions(options ...eventx.RetryConsumerOption) Option
WithRetryConsumerOptions ...
func WithRunnerOptions ¶
WithRunnerOptions ...
type Repository ¶
type Repository interface { eventx.Repository[InvalidateEvent] // GetMinSequence returns the min sequence number of all events (except events with null sequence numbers) // returns null if no events with sequence number existed GetMinSequence(ctx context.Context) (sql.NullInt64, error) // DeleteEventsBefore deletes events with sequence number < *beforeSeq* DeleteEventsBefore(ctx context.Context, beforeSeq uint64) error // GetLastSequence get from invalidate_offsets table GetLastSequence(ctx context.Context, serverName string) (sql.NullInt64, error) // SetLastSequence upsert into invalidate_offsets table SetLastSequence(ctx context.Context, serverName string, seq int64) error }
Repository ...
Click to show internal directories.
Click to hide internal directories.