blob: 5c378d5c3f1a1d0cc79794ba63d4bb6ce2d42f6c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
package ibd
import "github.com/ansg191/ibd-trader-backend/internal/ibd/transport"
type optionFunc func(*options)
var defaultOptions = options{
expectedStatuses: []int{200},
}
type options struct {
expectedStatuses []int
requiredProps transport.Properties
}
func withExpectedStatuses(statuses ...int) optionFunc {
return func(o *options) {
o.expectedStatuses = append(o.expectedStatuses, statuses...)
}
}
func withRequiredProps(props transport.Properties) optionFunc {
return func(o *options) {
o.requiredProps = props
}
}
|