mirror of
https://github.com/Chipazawra/v8-1c-cluster-pde.git
synced 2025-04-11 11:42:19 +02:00
33 lines
537 B
Go
33 lines
537 B
Go
package rclient
|
|
|
|
import (
|
|
"github.com/khorevaa/ras-client/internal/pool"
|
|
"github.com/khorevaa/ras-client/protocol/codec"
|
|
)
|
|
|
|
type Options struct {
|
|
serviceVersion string
|
|
poolOptions *pool.Options
|
|
codec codec.Codec
|
|
}
|
|
|
|
type Option func(opt *Options)
|
|
|
|
func WithVersion(version string) Option {
|
|
return func(opt *Options) {
|
|
if len(version) == 0 {
|
|
return
|
|
}
|
|
opt.serviceVersion = version
|
|
}
|
|
}
|
|
|
|
func WithPool(o *pool.Options) Option {
|
|
return func(opt *Options) {
|
|
if o == nil {
|
|
return
|
|
}
|
|
opt.poolOptions = o
|
|
}
|
|
}
|