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: zz_generated.endpoint.go
    path of file: ./repos/pipeline/src/api/cluster/pke/pkeservice/pkeservicedriver
    
    the code of the file until where you have to start completion: //go:build !ignore_autogenerated
// +build !ignore_autogenerated

// Code generated by mga tool. DO NOT EDIT.

package pkeservicedriver

import (
	"context"
	"errors"
	cluster "github.com/banzaicloud/pipeline/internal/cluster"
	"github.com/banzaicloud/pipeline/src/api/cluster/pke/pkeservice"
	"github.com/go-kit/kit/endpoint"
	kitxendpoint "github.com/sagikazarmark/kitx/endpoint"
)

// endpointError identifies an error that should be returned as an endpoint error.
type endpointEr
    
func MakeRegisterNodeStatusEndpoint(service pkeservice.Service) endpoint.Endpoint {
	return func(ctx context.Context, request interface{}) (interface{}, error) {
		req := request.(RegisterNodeStatusRequest)

		resp, err := service.RegisterNodeStatus(ctx, req.ClusterIdentifier, req.NodeStatus)

		if err != nil {
			if serviceErr := serviceError(nil); errors.As(err, &serviceErr) && serviceErr.ServiceError() {
				return RegisterNodeStatusResponse{
					Err:  err,
					Resp: resp,
				}, nil
			}

			return RegisterNodeStatusResponse{
				Err:  err,
				Resp: resp,
			}, err
		}

		return RegisterNodeStatusResponse{Resp: resp}, nil
	}
}