diff options
Diffstat (limited to 'common/sequencer/option.go')
| -rw-r--r-- | common/sequencer/option.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/common/sequencer/option.go b/common/sequencer/option.go new file mode 100644 index 0000000..1b3f613 --- /dev/null +++ b/common/sequencer/option.go @@ -0,0 +1,21 @@ +package sequencer + +type Option func(*Sequencer) + +func WithIncomingSeq(incomingSeq uint32) Option { + return func(s *Sequencer) { + s.incomingSeq = incomingSeq + } +} + +func WithOutgoingSeq(outgoingSeq uint32) Option { + return func(s *Sequencer) { + s.outgoingSeq = outgoingSeq + } +} + +func WithPing(ping int16) Option { + return func(s *Sequencer) { + s.ping = ping + } +} |
