You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: extauthz.go
    path of file: ./repos/istio/pilot/pkg/security/authz/builder
    
    the code of the file until where you have to start completion: // Copyright Istio Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
    
func processExtensionProvider(push *model.PushContext) map[string]*builtExtAuthz {
	resolved := map[string]*builtExtAuthz{}
	for i, config := range push.Mesh.ExtensionProviders {
		var errs error
		if config.Name == "" {
			errs = multierror.Append(errs, fmt.Errorf("extension provider name must not be empty, found empty at index: %d", i))
		} else if _, found := resolved[config.Name]; found {
			errs = multierror.Append(errs, fmt.Errorf("extension provider name must be unique, found duplicate: %s", config.Name))
		}
		var parsed *builtExtAuthz
		var err error
		// TODO(yangminzhu): Refactor and cache the ext_authz config.
		switch p := config.Provider.(type) {
		case *meshconfig.MeshConfig_ExtensionProvider_EnvoyExtAuthzHttp:
			if err = validation.ValidateExtensionProviderEnvoyExtAuthzHTTP(p.EnvoyExtAuthzHttp); err == nil {
				parsed, err = buildExtAuthzHTTP(push, p.EnvoyExtAuthzHttp)
			}
		case *meshconfig.MeshConfig_ExtensionProvider_EnvoyExtAuthzGrpc:
			if err = validation.ValidateExtensionProviderEnvoyExtAuthzGRPC(p.EnvoyExtAuthzGrpc); err == nil {
				parsed, err = buildExtAuthzGRPC(push, p.EnvoyExtAuthzGrpc)
			}
		default:
			continue
		}
		if err != nil {
			errs = multierror.Append(errs, multierror.Prefix(err, fmt.Sprintf("failed to parse extension provider %q:", config.Name)))
		}
		if parsed == nil {
			parsed = &builtExtAuthz{}
		}
		parsed.err = errs
		resolved[config.Name] = parsed
	}

	if authzLog.DebugEnabled() {
		authzLog.Debugf("Resolved extension providers: %v", spew.Sdump(resolved))
	}
	return resolved
}