mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
vendor update for CSI 0.3.0
This commit is contained in:
15
vendor/google.golang.org/grpc/service_config.go
generated
vendored
15
vendor/google.golang.org/grpc/service_config.go
generated
vendored
@ -32,7 +32,8 @@ const maxInt = int(^uint(0) >> 1)
|
||||
|
||||
// MethodConfig defines the configuration recommended by the service providers for a
|
||||
// particular method.
|
||||
// DEPRECATED: Users should not use this struct. Service config should be received
|
||||
//
|
||||
// Deprecated: Users should not use this struct. Service config should be received
|
||||
// through name resolver, as specified here
|
||||
// https://github.com/grpc/grpc/blob/master/doc/service_config.md
|
||||
type MethodConfig struct {
|
||||
@ -59,7 +60,8 @@ type MethodConfig struct {
|
||||
|
||||
// ServiceConfig is provided by the service provider and contains parameters for how
|
||||
// clients that connect to the service should behave.
|
||||
// DEPRECATED: Users should not use this struct. Service config should be received
|
||||
//
|
||||
// Deprecated: Users should not use this struct. Service config should be received
|
||||
// through name resolver, as specified here
|
||||
// https://github.com/grpc/grpc/blob/master/doc/service_config.md
|
||||
type ServiceConfig struct {
|
||||
@ -71,6 +73,8 @@ type ServiceConfig struct {
|
||||
// If there's no exact match, look for the default config for the service (/service/) and use the corresponding MethodConfig if it exists.
|
||||
// Otherwise, the method has no MethodConfig to use.
|
||||
Methods map[string]MethodConfig
|
||||
|
||||
stickinessMetadataKey *string
|
||||
}
|
||||
|
||||
func parseDuration(s *string) (*time.Duration, error) {
|
||||
@ -144,8 +148,9 @@ type jsonMC struct {
|
||||
|
||||
// TODO(lyuxuan): delete this struct after cleaning up old service config implementation.
|
||||
type jsonSC struct {
|
||||
LoadBalancingPolicy *string
|
||||
MethodConfig *[]jsonMC
|
||||
LoadBalancingPolicy *string
|
||||
StickinessMetadataKey *string
|
||||
MethodConfig *[]jsonMC
|
||||
}
|
||||
|
||||
func parseServiceConfig(js string) (ServiceConfig, error) {
|
||||
@ -158,6 +163,8 @@ func parseServiceConfig(js string) (ServiceConfig, error) {
|
||||
sc := ServiceConfig{
|
||||
LB: rsc.LoadBalancingPolicy,
|
||||
Methods: make(map[string]MethodConfig),
|
||||
|
||||
stickinessMetadataKey: rsc.StickinessMetadataKey,
|
||||
}
|
||||
if rsc.MethodConfig == nil {
|
||||
return sc, nil
|
||||
|
Reference in New Issue
Block a user