tests: Implement remaining GetOptions fields

This commit is contained in:
Marek Siarkowicz
2022-02-24 13:13:18 +01:00
parent fd5cd9fd98
commit f7ee30cc41
6 changed files with 85 additions and 27 deletions

View File

@@ -14,14 +14,16 @@
package testutils
import clientv3 "go.etcd.io/etcd/client/v3"
type GetOptions struct {
Revision int
End string
CountOnly bool
Serializable bool
}
type GetOption func(*GetOptions)
func WithSerializable() GetOption {
return func(options *GetOptions) {
options.Serializable = true
}
Prefix bool
FromKey bool
Limit int
Order clientv3.SortOrder
SortBy clientv3.SortTarget
}