1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 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 } }