2019-12-24 20:33:05 +03:00
|
|
|
package client
|
|
|
|
|
|
|
|
type LogOptions struct {
|
|
|
|
Params map[string]string
|
|
|
|
}
|
|
|
|
|
2019-12-27 23:08:46 +03:00
|
|
|
type WatchOptions struct {
|
|
|
|
Params map[string]string
|
|
|
|
}
|
|
|
|
|
2019-12-24 20:33:05 +03:00
|
|
|
type LogOption func(*LogOptions)
|
2019-12-27 23:08:46 +03:00
|
|
|
type WatchOption func(*WatchOptions)
|
2019-12-24 20:33:05 +03:00
|
|
|
|
|
|
|
// LogParams provides additional params for logs
|
|
|
|
func LogParams(p map[string]string) LogOption {
|
|
|
|
return func(l *LogOptions) {
|
|
|
|
l.Params = p
|
|
|
|
}
|
|
|
|
}
|
2019-12-27 23:08:46 +03:00
|
|
|
|
|
|
|
// WatchParams used for watch params
|
|
|
|
func WatchParams(p map[string]string) WatchOption {
|
|
|
|
return func(w *WatchOptions) {
|
|
|
|
w.Params = p
|
|
|
|
}
|
|
|
|
}
|