grpcgoogle.golang.org/grpc/internal/serviceconfig Index | Files

package serviceconfig

import "google.golang.org/grpc/internal/serviceconfig"

Package serviceconfig contains utility functions to parse service config.

Index

Types

type BalancerConfig

type BalancerConfig struct {
	Name   string
	Config externalserviceconfig.LoadBalancingConfig
}

BalancerConfig wraps the name and config associated with one load balancing policy. It corresponds to a single entry of the loadBalancingConfig field from ServiceConfig.

It implements the json.Unmarshaler interface.

https://github.com/grpc/grpc-proto/blob/54713b1e8bc6ed2d4f25fb4dff527842150b91b2/grpc/service_config/service_config.proto#L247

func (*BalancerConfig) UnmarshalJSON

func (bc *BalancerConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

ServiceConfig contains a list of loadBalancingConfigs, each with a name and config. This method iterates through that list in order, and stops at the first policy that is supported.

Source Files

serviceconfig.go

Version
v1.33.3
Published
Jan 11, 2021
Platform
linux/amd64
Imports
5 packages
Last checked
1 hour ago

Tools for package owners.