Fetch the repository succeeded.
package remote
import "google.golang.org/grpc"
type ConfigOption func(config *Config)
// WithEndpointWriterBatchSize sets the batch size for the endpoint writer
func WithEndpointWriterBatchSize(batchSize int) ConfigOption {
return func(config *Config) {
config.EndpointWriterBatchSize = batchSize
}
}
// WithEndpointWriterQueueSize sets the queue size for the endpoint writer
func WithEndpointWriterQueueSize(queueSize int) ConfigOption {
return func(config *Config) {
config.EndpointWriterQueueSize = queueSize
}
}
// WithEndpointManagerBatchSize sets the batch size for the endpoint manager
func WithEndpointManagerBatchSize(batchSize int) ConfigOption {
return func(config *Config) {
config.EndpointManagerBatchSize = batchSize
}
}
// WithEndpointManagerQueueSize sets the queue size for the endpoint manager
func WithEndpointManagerQueueSize(queueSize int) ConfigOption {
return func(config *Config) {
config.EndpointManagerQueueSize = queueSize
}
}
// WithDialOptions sets the dial options for the remote
func WithDialOptions(options ...grpc.DialOption) ConfigOption {
return func(config *Config) {
config.DialOptions = options
}
}
// WithServerOptions sets the server options for the remote
func WithServerOptions(options ...grpc.ServerOption) ConfigOption {
return func(config *Config) {
config.ServerOptions = options
}
}
// WithCallOptions sets the call options for the remote
func WithCallOptions(options ...grpc.CallOption) ConfigOption {
return func(config *Config) {
config.CallOptions = options
}
}
// WithAdvertisedHost sets the advertised host for the remote
func WithAdvertisedHost(address string) ConfigOption {
return func(config *Config) {
config.AdvertisedHost = address
}
}
// WithKinds adds the kinds to the remote
func WithKinds(kinds ...*Kind) ConfigOption {
return func(config *Config) {
for _, k := range kinds {
config.Kinds[k.Kind] = k.Props
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。