code: func NewConfig(contextType TypeGetter, endpoints ...NamedTypeGetter) Config {
  	res := Config{
  		contextType:   contextType,
  		endpointTypes: make(map[string]TypeGetter),
  	}
  	for _, e := range endpoints {
  		res.endpointTypes[e.name] = e.typeGetter
  	}
  	return res
  }
docs: // NewConfig creates a config object