Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pkg/mls/api/v1/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,15 @@ type Service struct {
ctxCancel func()

disablePublish bool

cutoverChecker *migration.CutoverChecker

// Subscribe (XIP-83) tunables; overridable in tests. Default to the package consts
// (subscribePingInterval / subscribePongDeadline / maxPendingBytes / maxFrameBytes).
pingInterval time.Duration
pongDeadline time.Duration
maxPendingBytes int
maxFrameBytes int
}

func NewService(
Expand All @@ -71,6 +79,10 @@ func NewService(
subDispatcher: subDispatcher,
disablePublish: disablePublish,
cutoverChecker: cutoverChecker,
pingInterval: subscribePingInterval,
pongDeadline: subscribePongDeadline,
maxPendingBytes: maxPendingBytes,
maxFrameBytes: maxFrameBytes,
}
s.ctx, s.ctxCancel = context.WithCancel(context.Background())
if s.dbWorker, err = newDBWorker(s.ctx, log, s.readOnlyStore.Queries(), subDispatcher, DEFAULT_POLL_INTERVAL); err != nil {
Expand Down
Loading
Loading