code: func EndpointFromContext(metadata store.Metadata) *EndpointMeta {
  	ep, ok := metadata.Endpoints[KubernetesEndpoint]
  	if !ok {
  		return nil
  	}
  	typed, ok := ep.(EndpointMeta)
  	if !ok {
  		return nil
  	}
  	return &typed
  }
docs: // EndpointFromContext extracts kubernetes endpoint info from current context