var logger … type BalancerConfig … type intermediateBalancerConfig … // MarshalJSON implements the json.Marshaler interface. // // It marshals the balancer and config into a length-1 slice // ([]map[string]config). func (bc *BalancerConfig) MarshalJSON() ([]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. // - If the config for the first supported policy is invalid, the whole service // config is invalid. // - If the list doesn't contain any supported policy, the whole service config // is invalid. func (bc *BalancerConfig) UnmarshalJSON(b []byte) error { … } type MethodConfig … type RetryPolicy …