// GetAdminClient returns a new admin client connection for this peer func GetAdminClient() (pb.AdminClient, error) { clientConn, err := peer.NewPeerClientConnection() if err != nil { err = errors.ErrorWithCallstack(errors.Peer, errors.PeerConnectionError, err.Error()) return nil, err } adminClient := pb.NewAdminClient(clientConn) return adminClient, nil }
// GetEndorserClient returns a new endorser client connection for this peer func GetEndorserClient() (pb.EndorserClient, error) { clientConn, err := peer.NewPeerClientConnection() if err != nil { err = errors.ErrorWithCallstack(errors.Peer, errors.PeerConnectionError, err.Error()) return nil, err } endorserClient := pb.NewEndorserClient(clientConn) return endorserClient, nil }