func (rr *RegistrationReceiver) Register(_ context.Context, req *interop.RegistrationRequest) (*interop.RegistrationResponse, error) {
	sn := req.GetServerName()
	if _, exists := rr.RegisteredServices[sn]; exists {
		err := sn + " already registered"
		return &interop.RegistrationResponse{Status: &interop.CommonResponseStatus{Status: interop.Status_FAILURE, Error: err}}, nil
	}
	rr.RegisteredServices[sn] = req.GetServices()
	return &interop.RegistrationResponse{Status: &interop.CommonResponseStatus{Status: interop.Status_SUCCESS}}, nil
}
Register is the gRPC method that handles registration requests from interop test servers.
package registrationservice
import (
	"context"
	"github.com/census-ecosystem/opencensus-experiments/interoptest/src/testcoordinator/genproto"
)
type RegistrationReceiver struct {
	RegisteredServices map[string][]*interop.Service
}